mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- some more translucency checks.
This commit is contained in:
parent
1362a7ebc5
commit
c9483353ff
3 changed files with 5 additions and 4 deletions
|
@ -202,7 +202,8 @@ void HWFlat::DrawFlat(HWDrawInfo *di, FRenderState &state, bool translucent)
|
|||
|
||||
state.SetRenderStyle(RenderStyle);
|
||||
state.SetTextureMode(RenderStyle);
|
||||
if (!texture->GetTranslucency()) state.AlphaFunc(Alpha_GEqual, gl_mask_threshold);
|
||||
|
||||
if (!texture || !checkTranslucentReplacement(texture->GetID(), palette)) state.AlphaFunc(Alpha_GEqual, texture->alphaThreshold);
|
||||
else state.AlphaFunc(Alpha_GEqual, 0.f);
|
||||
}
|
||||
state.SetMaterial(texture, UF_Texture, 0, sprite == nullptr? CLAMP_NONE : CLAMP_XY, TRANSLATION(Translation_Remap + curbasepal, palette), -1);
|
||||
|
|
|
@ -75,7 +75,7 @@ void HWSprite::DrawSprite(HWDrawInfo* di, FRenderState& state, bool translucent)
|
|||
state.SetRenderStyle(RenderStyle);
|
||||
state.SetTextureMode(RenderStyle);
|
||||
|
||||
if (!texture || !texture->GetTranslucency()) state.AlphaFunc(Alpha_GEqual, gl_mask_sprite_threshold);
|
||||
if (!texture || !checkTranslucentReplacement(texture->GetID(), palette)) state.AlphaFunc(Alpha_GEqual, texture->alphaThreshold);
|
||||
else state.AlphaFunc(Alpha_Greater, 0.f);
|
||||
|
||||
if (RenderStyle.BlendOp == STYLEOP_Add && RenderStyle.DestAlpha == STYLEALPHA_One)
|
||||
|
|
|
@ -176,7 +176,7 @@ void HWWall::RenderMirrorSurface(HWDrawInfo *di, FRenderState &state)
|
|||
|
||||
state.EnableTextureMatrix(false);
|
||||
state.SetEffect(EFF_NONE);
|
||||
state.AlphaFunc(Alpha_GEqual, gl_mask_sprite_threshold);
|
||||
state.AlphaFunc(Alpha_GEqual, 0.5f);
|
||||
|
||||
state.SetDepthFunc(DF_Less);
|
||||
state.SetRenderStyle(STYLE_Translucent);
|
||||
|
@ -235,7 +235,7 @@ void HWWall::RenderTranslucentWall(HWDrawInfo *di, FRenderState &state)
|
|||
|
||||
state.SetRenderStyle(RenderStyle);
|
||||
state.SetTextureMode(RenderStyle);
|
||||
if (!texture->GetTranslucency()) state.AlphaFunc(Alpha_GEqual, gl_mask_threshold);
|
||||
if (!texture || !checkTranslucentReplacement(texture->GetID(), palette)) state.AlphaFunc(Alpha_GEqual, texture->alphaThreshold);
|
||||
else state.AlphaFunc(Alpha_GEqual, 0.f);
|
||||
RenderTexturedWall(di, state, HWWall::RWF_TEXTURED);
|
||||
state.SetRenderStyle(STYLE_Translucent);
|
||||
|
|
Loading…
Reference in a new issue