- Added 'canonical transparency' cvar r_canontrans - this simply turns off transparency for Doom objects that were marked as transparent sometime in ZDoom's development cycle

This commit is contained in:
Rachael Alexanderson 2017-06-01 10:41:52 -04:00 committed by Christoph Oelckers
commit 01f88cfb16
19 changed files with 33 additions and 3 deletions

View file

@ -31,6 +31,7 @@
EXTERN_CVAR(Float, transsouls)
EXTERN_CVAR(Int, r_drawfuzz)
EXTERN_CVAR (Bool, r_canontrans)
bool RenderPolySprite::GetLine(AActor *thing, DVector2 &left, DVector2 &right)
{
@ -145,7 +146,10 @@ void RenderPolySprite::Render(const TriMatrix &worldToClip, const PolyClipPlane
args.SetStencilTestValue(stencilValue);
args.SetWriteStencil(true, stencilValue);
args.SetClipPlane(clipPlane);
args.SetStyle(thing->RenderStyle, thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite);
if ((thing->flags8 & MF8_ZDOOMTRANS) && r_canontrans)
args.SetStyle(LegacyRenderStyles[STYLE_Normal], 1.0f, thing->fillcolor, thing->Translation, tex, fullbrightSprite);
else
args.SetStyle(thing->RenderStyle, thing->Alpha, thing->fillcolor, thing->Translation, tex, fullbrightSprite);
args.SetSubsectorDepthTest(true);
args.SetWriteSubsectorDepth(false);
args.SetWriteStencil(false);