mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-31 09:20:59 +00:00
- fixed alpha threshold.
Not only is this a deprecated feature - it also does not work right when complex lighting is at play, it must be done in the shader to get proper results.
This commit is contained in:
parent
7e70c217fe
commit
cae710bd59
14 changed files with 221 additions and 28 deletions
|
@ -281,7 +281,7 @@ bool GLInstance::SetTextureInternal(int picnum, FTexture* tex, int palette, int
|
|||
if (TextureType == TT_HICREPLACE)
|
||||
{
|
||||
al = ((unsigned)picnum < MAXTILES && alphahackarray[picnum] != 0) ? alphahackarray[picnum] * (1.f / 255.f) :
|
||||
(tex->alphaThreshold >= 0.f ? tex->alphaThreshold : 0.f);
|
||||
(tex->alphaThreshold >= 0 ? tex->alphaThreshold * (1.f / 255.f) : 0.f);
|
||||
}
|
||||
GLInterface.SetAlphaThreshold(al);
|
||||
return true;
|
||||
|
@ -302,6 +302,7 @@ bool GLInstance::SetNamedTexture(FTexture* tex, int palette, int sampler)
|
|||
|
||||
renderState.Flags &= ~RF_UsePalette;
|
||||
BindTexture(0, mtex, sampler);
|
||||
GLInterface.SetAlphaThreshold(tex->isTranslucent()? 0.f : 0.5f);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue