From 4604c9379c575d6b1a9eb94b9932af55e11a044a Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Mon, 3 Dec 2018 10:46:28 +0100 Subject: [PATCH 1/2] - disable alpha test on models if the renderstyle isn't STYLE_Normal --- src/hwrenderer/scene/hw_sprites.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hwrenderer/scene/hw_sprites.cpp b/src/hwrenderer/scene/hw_sprites.cpp index 6ea4a1b1f..b5beb9d99 100644 --- a/src/hwrenderer/scene/hw_sprites.cpp +++ b/src/hwrenderer/scene/hw_sprites.cpp @@ -1029,7 +1029,7 @@ void GLSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t RenderStyle.DestAlpha = STYLEALPHA_InvSrc; } } - if ((gltexture && gltexture->tex->GetTranslucency()) || (RenderStyle.Flags & STYLEF_RedIsAlpha)) + if ((gltexture && gltexture->tex->GetTranslucency()) || (RenderStyle.Flags & STYLEF_RedIsAlpha) || (modelframe && RenderStyle != DefaultRenderStyle())) { if (hw_styleflags == STYLEHW_Solid) { From 1e30bc72febc0f288196e457290290c98ffbfbab Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Mon, 3 Dec 2018 11:10:40 +0100 Subject: [PATCH 2/2] - compare against the thing renderstyle since the local copy has been modified --- src/hwrenderer/scene/hw_sprites.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hwrenderer/scene/hw_sprites.cpp b/src/hwrenderer/scene/hw_sprites.cpp index b5beb9d99..84a91a307 100644 --- a/src/hwrenderer/scene/hw_sprites.cpp +++ b/src/hwrenderer/scene/hw_sprites.cpp @@ -1029,7 +1029,7 @@ void GLSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t RenderStyle.DestAlpha = STYLEALPHA_InvSrc; } } - if ((gltexture && gltexture->tex->GetTranslucency()) || (RenderStyle.Flags & STYLEF_RedIsAlpha) || (modelframe && RenderStyle != DefaultRenderStyle())) + if ((gltexture && gltexture->tex->GetTranslucency()) || (RenderStyle.Flags & STYLEF_RedIsAlpha) || (modelframe && thing->RenderStyle != DefaultRenderStyle())) { if (hw_styleflags == STYLEHW_Solid) {