fixed anisotropic filtering; updated librw
This commit is contained in:
parent
ef24783bff
commit
c67273e92a
@ -264,6 +264,7 @@ enum Config {
|
||||
#define IMPROVED_VIDEOMODE // save and load videomode parameters instead of a magic number
|
||||
#define DISABLE_LOADING_SCREEN // disable the loading screen which vastly improves the loading time
|
||||
#define DISABLE_VSYNC_ON_TEXTURE_CONVERSION // make texture conversion work faster by disabling vsync
|
||||
#define ANISOTROPIC_FILTERING // set all textures to max anisotropic filtering
|
||||
//#define USE_TEXTURE_POOL
|
||||
#ifdef LIBRW
|
||||
#define EXTENDED_COLOURFILTER // more options for colour filter (replaces mblur)
|
||||
|
@ -3,6 +3,9 @@
|
||||
#include "rphanim.h"
|
||||
#include "rpskin.h"
|
||||
#include "rtbmp.h"
|
||||
#ifdef ANISOTROPIC_FILTERING
|
||||
#include "rpanisot.h"
|
||||
#endif
|
||||
|
||||
#include "main.h"
|
||||
#include "CdStream.h"
|
||||
@ -432,6 +435,9 @@ PluginAttach(void)
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
#ifdef ANISOTROPIC_FILTERING
|
||||
RpAnisotPluginAttach();
|
||||
#endif
|
||||
#ifdef EXTENDED_PIPELINES
|
||||
CustomPipes::CustomPipeRegister();
|
||||
#endif
|
||||
@ -440,7 +446,7 @@ PluginAttach(void)
|
||||
}
|
||||
|
||||
#ifdef GTA_PS2
|
||||
#define NUM_PREALLOC_ATOMICS 3245
|
||||
#define NUM_PREALLOC_ATOMICS 32455
|
||||
#define NUM_PREALLOC_CLUMPS 101
|
||||
#define NUM_PREALLOC_FRAMES 2821
|
||||
#define NUM_PREALLOC_GEOMETRIES 1404
|
||||
|
@ -962,3 +962,12 @@ RtCharset *RtCharsetSetColors(RtCharset * charSet, const RwRGBA * foreGround,
|
||||
RtCharset *RtCharsetGetDesc(RtCharset * charset, RtCharsetDesc * desc) { *desc = charset->desc; return charset; }
|
||||
RtCharset *RtCharsetCreate(const RwRGBA * foreGround, const RwRGBA * backGround) { return Charset::create(foreGround, backGround); }
|
||||
RwBool RtCharsetDestroy(RtCharset * charSet) { charSet->destroy(); return true; }
|
||||
|
||||
|
||||
|
||||
#include <rpanisot.h>
|
||||
|
||||
RwInt8 RpAnisotGetMaxSupportedMaxAnisotropy(void) { return rw::getMaxSupportedMaxAnisotropy(); }
|
||||
RwTexture *RpAnisotTextureSetMaxAnisotropy(RwTexture *tex, RwInt8 val) { tex->setMaxAnisotropy(val); return tex; }
|
||||
RwInt8 RpAnisotTextureGetMaxAnisotropy(RwTexture *tex) { return tex->getMaxAnisotropy(); }
|
||||
RwBool RpAnisotPluginAttach(void) { rw::registerAnisotropyPlugin(); return true; }
|
||||
|
6
src/fakerw/rpanisot.h
Normal file
6
src/fakerw/rpanisot.h
Normal file
@ -0,0 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
RwInt8 RpAnisotGetMaxSupportedMaxAnisotropy(void);
|
||||
RwTexture *RpAnisotTextureSetMaxAnisotropy(RwTexture *tex, RwInt8 val);
|
||||
RwInt8 RpAnisotTextureGetMaxAnisotropy(RwTexture *tex);
|
||||
RwBool RpAnisotPluginAttach(void);
|
@ -2,6 +2,9 @@
|
||||
#pragma warning( disable : 4005)
|
||||
#pragma warning( pop )
|
||||
#include "common.h"
|
||||
#ifdef ANISOTROPIC_FILTERING
|
||||
#include "rpanisot.h"
|
||||
#endif
|
||||
#include "crossplatform.h"
|
||||
#include "platform.h"
|
||||
|
||||
@ -48,6 +51,12 @@ RwTextureGtaStreamRead(RwStream *stream)
|
||||
texLoadTime = (texNumLoaded * texLoadTime + (float)CTimer::GetCurrentTimeInCycles() / (float)CTimer::GetCyclesPerMillisecond() - preloadTime) / (float)(texNumLoaded+1);
|
||||
texNumLoaded++;
|
||||
}
|
||||
|
||||
#ifdef ANISOTROPIC_FILTERING
|
||||
if(tex && RpAnisotGetMaxSupportedMaxAnisotropy() > 1) // BUG? this was RpAnisotTextureGetMaxAnisotropy, but that doesn't make much sense
|
||||
RpAnisotTextureSetMaxAnisotropy(tex, RpAnisotGetMaxSupportedMaxAnisotropy());
|
||||
#endif
|
||||
|
||||
return tex;
|
||||
}
|
||||
|
||||
|
2
vendor/librw
vendored
2
vendor/librw
vendored
@ -1 +1 @@
|
||||
Subproject commit 9260bddc66f70eb51adf0749fa835fed1562c178
|
||||
Subproject commit 60a5ace16309ccd3d174a3ec14a1062540934066
|
Loading…
Reference in New Issue
Block a user