mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +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;
|
||||
}
|
||||
|
||||
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.
|
||||
GLInterface.SetTinting(texpick.tintFlags, texpick.tintColor, texpick.tintColor);
|
||||
GLInterface.SetPalette(GetTranslationType(lookuppal) - Translation_Remap);
|
||||
GLInterface.SetPalswap(GetTranslationIndex(lookuppal));
|
||||
if (texpick.translation != 0)
|
||||
{
|
||||
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);
|
||||
auto &mat = renderState.mMaterial;
|
||||
mat.mMaterial = FMaterial::ValidateTexture(tex, 0); // todo allow scaling
|
||||
|
|
Loading…
Reference in a new issue