- 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:
parent
7acb492852
commit
01f88cfb16
19 changed files with 33 additions and 3 deletions
|
|
@ -75,6 +75,7 @@ CUSTOM_CVAR(Int, gl_fuzztype, 0, CVAR_ARCHIVE)
|
|||
}
|
||||
|
||||
EXTERN_CVAR (Float, transsouls)
|
||||
EXTERN_CVAR (Bool, r_canontrans)
|
||||
|
||||
extern TArray<spritedef_t> sprites;
|
||||
extern TArray<spriteframe_t> SpriteFrames;
|
||||
|
|
@ -992,6 +993,13 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
|
|||
{
|
||||
trans = 1.f;
|
||||
}
|
||||
if ((thing->flags8 & MF8_ZDOOMTRANS) && r_canontrans)
|
||||
{ // [SP] "canonical transparency" - with the flip of a CVar, disable transparency for Doom objects
|
||||
trans = 1.f;
|
||||
RenderStyle.BlendOp = STYLEOP_Add;
|
||||
RenderStyle.SrcAlpha = STYLEALPHA_One;
|
||||
RenderStyle.DestAlpha = STYLEALPHA_Zero;
|
||||
}
|
||||
|
||||
if (trans >= 1.f - FLT_EPSILON && RenderStyle.BlendOp != STYLEOP_Shadow && (
|
||||
(RenderStyle.SrcAlpha == STYLEALPHA_One && RenderStyle.DestAlpha == STYLEALPHA_Zero) ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue