mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 12:10:53 +00:00
- set proper palette for null translation.
This commit is contained in:
parent
ea08fa0a4e
commit
88eea8269a
1 changed files with 12 additions and 3 deletions
|
@ -77,12 +77,21 @@ bool GLInstance::SetTexture(int picnum, FGameTexture* tex, int paletteid, int me
|
||||||
sampler = CLAMP_CAMTEX;
|
sampler = CLAMP_CAMTEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
int lookuppal = texpick.translation & 0x7fffffff;
|
|
||||||
|
|
||||||
// This is intentionally the same value for both parameters. The shader does not use the same uniform for modulation and overlay colors.
|
// This is intentionally the same value for both parameters. The shader does not use the same uniform for modulation and overlay colors.
|
||||||
GLInterface.SetTinting(texpick.tintFlags, texpick.tintColor, texpick.tintColor);
|
GLInterface.SetTinting(texpick.tintFlags, texpick.tintColor, texpick.tintColor);
|
||||||
GLInterface.SetPalette(GetTranslationType(lookuppal) - Translation_Remap);
|
if (texpick.translation != 0)
|
||||||
GLInterface.SetPalswap(GetTranslationIndex(lookuppal));
|
{
|
||||||
|
int lookuppal = texpick.translation & 0x7fffffff;
|
||||||
|
GLInterface.SetPalette(GetTranslationType(lookuppal) - Translation_Remap);
|
||||||
|
GLInterface.SetPalswap(GetTranslationIndex(lookuppal));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GLInterface.SetPalette(0);
|
||||||
|
GLInterface.SetPalswap(0);
|
||||||
|
}
|
||||||
|
|
||||||
GLInterface.SetBasepalTint(texpick.basepalTint);
|
GLInterface.SetBasepalTint(texpick.basepalTint);
|
||||||
auto &mat = renderState.mMaterial;
|
auto &mat = renderState.mMaterial;
|
||||||
mat.mMaterial = FMaterial::ValidateTexture(tex, 0); // todo allow scaling
|
mat.mMaterial = FMaterial::ValidateTexture(tex, 0); // todo allow scaling
|
||||||
|
|
Loading…
Reference in a new issue