mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
- fixed voxel rendering in palette emulation mode.
This commit is contained in:
parent
aeeec61f39
commit
fe329b0870
4 changed files with 4 additions and 7 deletions
|
@ -1151,7 +1151,7 @@ int32_t polymost_voxdraw(voxmodel_t *m, tspriteptr_t const tspr)
|
|||
|
||||
GLInterface.SetPalswap(globalpal);
|
||||
// The texture here is already translated.
|
||||
GLInterface.SetTexture(-1, htex, 0/*TRANSLATION(Translation_Remap + curbasepal, globalpal)*/, CLAMP_NOFILTER_XY);
|
||||
GLInterface.SetTexture(-1, htex, 0/*TRANSLATION(Translation_Remap + curbasepal, globalpal)*/, CLAMP_NOFILTER_XY, true);
|
||||
|
||||
// This must be done after setting up the texture.
|
||||
auto& h = lookups.tables[globalpal];
|
||||
|
|
|
@ -56,7 +56,7 @@ CVAR(Int, fixpalette, -1, 0)
|
|||
CVAR(Int, fixpalswap, -1, 0)
|
||||
#endif
|
||||
|
||||
bool GLInstance::SetTexture(int picnum, FGameTexture* tex, int paletteid, int sampler)
|
||||
bool GLInstance::SetTexture(int picnum, FGameTexture* tex, int paletteid, int sampler, bool notindexed)
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
int basepal = GetTranslationType(paletteid) - Translation_Remap;
|
||||
|
@ -83,14 +83,12 @@ bool GLInstance::SetTexture(int picnum, FGameTexture* tex, int paletteid, int sa
|
|||
|
||||
SetBasepalTint(texpick.basepalTint);
|
||||
auto &mat = renderState.mMaterial;
|
||||
int flags = hw_useindexedcolortextures ? CTF_Indexed : 0;
|
||||
int flags = (!notindexed && hw_useindexedcolortextures) ? CTF_Indexed : 0;
|
||||
mat.mMaterial = FMaterial::ValidateTexture(texpick.texture, flags); // todo allow scaling
|
||||
mat.mClampMode = sampler;
|
||||
mat.mTranslation = texpick.translation;
|
||||
mat.mOverrideShader = -1;
|
||||
mat.mChanged = true;
|
||||
if (TextureType == TT_INDEXED) renderState.Flags |= RF_UsePalette;
|
||||
else renderState.Flags &= ~RF_UsePalette;
|
||||
GLInterface.SetAlphaThreshold(tex->alphaThreshold);
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -351,7 +351,7 @@ public:
|
|||
renderState.AlphaThreshold = al;
|
||||
}
|
||||
|
||||
bool SetTexture(int globalpicnum, FGameTexture* tex, int palette, int sampleroverride);
|
||||
bool SetTexture(int globalpicnum, FGameTexture* tex, int palette, int sampleroverride, bool notindexed = false);
|
||||
};
|
||||
|
||||
extern GLInstance GLInterface;
|
||||
|
|
|
@ -16,7 +16,6 @@ enum EMatrixType
|
|||
enum PRSFlags
|
||||
{
|
||||
RF_ColorOnly = 1,
|
||||
RF_UsePalette = 2,
|
||||
RF_ShadeInterpolate = 64,
|
||||
RF_FogDisabled = 128,
|
||||
RF_MapFog = 256, // RRRA E2L1.
|
||||
|
|
Loading…
Reference in a new issue