From 4b2cdd375a9271006372de00fe5cea0f89e403be Mon Sep 17 00:00:00 2001 From: nashmuhandes Date: Fri, 13 Sep 2024 16:56:55 +0800 Subject: [PATCH] Enable `DisableAlphaTest` feature inside Material blocks. Needed for some custom materials that need to do stuff with the material alpha. --- src/r_data/gldefs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/r_data/gldefs.cpp b/src/r_data/gldefs.cpp index 8b62885fc..fc8d5961c 100644 --- a/src/r_data/gldefs.cpp +++ b/src/r_data/gldefs.cpp @@ -1361,6 +1361,12 @@ class GLDefsParser sc.MustGetString(); usershader.shader = sc.String; } + else if (sc.Compare("disablealphatest")) + { + tex->SetTranslucent(true); + if (usershader.shader.IsNotEmpty()) + usershader.disablealphatest = true; + } else if (sc.Compare("texture")) { sc.MustGetString();