mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-29 04:50:42 +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);
|
GLInterface.SetPalswap(globalpal);
|
||||||
// The texture here is already translated.
|
// 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.
|
// This must be done after setting up the texture.
|
||||||
auto& h = lookups.tables[globalpal];
|
auto& h = lookups.tables[globalpal];
|
||||||
|
|
|
@ -56,7 +56,7 @@ CVAR(Int, fixpalette, -1, 0)
|
||||||
CVAR(Int, fixpalswap, -1, 0)
|
CVAR(Int, fixpalswap, -1, 0)
|
||||||
#endif
|
#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
|
#ifdef _DEBUG
|
||||||
int basepal = GetTranslationType(paletteid) - Translation_Remap;
|
int basepal = GetTranslationType(paletteid) - Translation_Remap;
|
||||||
|
@ -83,14 +83,12 @@ bool GLInstance::SetTexture(int picnum, FGameTexture* tex, int paletteid, int sa
|
||||||
|
|
||||||
SetBasepalTint(texpick.basepalTint);
|
SetBasepalTint(texpick.basepalTint);
|
||||||
auto &mat = renderState.mMaterial;
|
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.mMaterial = FMaterial::ValidateTexture(texpick.texture, flags); // todo allow scaling
|
||||||
mat.mClampMode = sampler;
|
mat.mClampMode = sampler;
|
||||||
mat.mTranslation = texpick.translation;
|
mat.mTranslation = texpick.translation;
|
||||||
mat.mOverrideShader = -1;
|
mat.mOverrideShader = -1;
|
||||||
mat.mChanged = true;
|
mat.mChanged = true;
|
||||||
if (TextureType == TT_INDEXED) renderState.Flags |= RF_UsePalette;
|
|
||||||
else renderState.Flags &= ~RF_UsePalette;
|
|
||||||
GLInterface.SetAlphaThreshold(tex->alphaThreshold);
|
GLInterface.SetAlphaThreshold(tex->alphaThreshold);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -351,7 +351,7 @@ public:
|
||||||
renderState.AlphaThreshold = al;
|
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;
|
extern GLInstance GLInterface;
|
||||||
|
|
|
@ -16,7 +16,6 @@ enum EMatrixType
|
||||||
enum PRSFlags
|
enum PRSFlags
|
||||||
{
|
{
|
||||||
RF_ColorOnly = 1,
|
RF_ColorOnly = 1,
|
||||||
RF_UsePalette = 2,
|
|
||||||
RF_ShadeInterpolate = 64,
|
RF_ShadeInterpolate = 64,
|
||||||
RF_FogDisabled = 128,
|
RF_FogDisabled = 128,
|
||||||
RF_MapFog = 256, // RRRA E2L1.
|
RF_MapFog = 256, // RRRA E2L1.
|
||||||
|
|
Loading…
Reference in a new issue