- disable palette emulation for Blood's cutscenes.

These use color 255 as a valid index which the palette emulation shader does not handle.
This commit is contained in:
Christoph Oelckers 2020-02-04 20:40:10 +01:00
parent 1126d5e3d4
commit 5d4514060b
4 changed files with 10 additions and 3 deletions

View file

@ -253,6 +253,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav)
inputState.ClearAllInput();
int nFrame = 0;
hw_int_useindexedcolortextures = false;
do
{
gameHandleEvents();
@ -275,6 +276,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav)
nFrame++;
Smacker_GetNextFrame(hSMK);
} while(nFrame < nFrames);
hw_int_useindexedcolortextures = hw_useindexedcolortextures;
Smacker_Close(hSMK);
inputState.ClearAllInput();

View file

@ -1119,6 +1119,7 @@ EXTERN_CVAR(Bool, hw_models)
EXTERN_CVAR(Float, hw_shadescale)
EXTERN_CVAR(Int, hw_anisotropy)
EXTERN_CVAR(Int, hw_texfilter)
extern bool hw_int_useindexedcolortextures;
EXTERN_CVAR(Bool, hw_useindexedcolortextures)
EXTERN_CVAR(Bool, hw_parallaxskypanning)
EXTERN_CVAR(Bool, r_voxels)

View file

@ -23,12 +23,16 @@ CVAR(Bool, hw_detailmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, hw_glowmapping, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, hw_polygonmode, 0, 0)
CVARD(Bool, hw_animsmoothing, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable model animation smoothing")
CVARD(Bool, hw_hightile, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable hightile texture rendering")
CVARD(Bool, hw_hightile, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable hightile texture rendering")
CVARD(Bool, hw_models, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable model rendering")
CVARD(Bool, hw_parallaxskypanning, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable parallaxed floor/ceiling panning when drawing a parallaxing sky")
CVARD(Bool, hw_shadeinterpolate, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable shade interpolation")
CVARD(Float, hw_shadescale, 1.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "multiplier for shading")
CVARD(Bool, hw_useindexedcolortextures, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable indexed color texture rendering")
bool hw_int_useindexedcolortextures;
CUSTOM_CVARD(Bool, hw_useindexedcolortextures, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "enable/disable indexed color texture rendering")
{
hw_int_useindexedcolortextures = self;
}
CUSTOM_CVARD(Int, hw_texfilter, TEXFILTER_ON, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "changes the texture filtering settings")

View file

@ -160,7 +160,7 @@ bool GLInstance::SetTextureInternal(int picnum, FTexture* tex, int palette, int
bool texbound[3] = {};
int MatrixChange = 0;
TextureType = hw_useindexedcolortextures? TT_INDEXED : TT_TRUECOLOR;
TextureType = hw_int_useindexedcolortextures? TT_INDEXED : TT_TRUECOLOR;
int lookuppal = 0;
VSMatrix texmat;