From bb6ab60d52fd85d2e834f5c718d420dcf62be89d Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Fri, 16 Aug 2024 01:47:29 +0200 Subject: [PATCH] gl_shader: more unused GLSL permutation detection --- src/engine/renderer/gl_shader.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/engine/renderer/gl_shader.cpp b/src/engine/renderer/gl_shader.cpp index 401ff6244f..2e3ab3c1ef 100644 --- a/src/engine/renderer/gl_shader.cpp +++ b/src/engine/renderer/gl_shader.cpp @@ -890,6 +890,7 @@ static bool IsUnusedPermutation( const char *compileMacros ) if ( strcmp( token, "USE_NORMAL_MAPPING" ) == 0 ) { if ( !glConfig2.normalMapping ) return true; + if ( !glConfig2.deluxeMapping ) return true; } else if ( strcmp( token, "USE_DELUXE_MAPPING" ) == 0 ) { @@ -902,6 +903,7 @@ static bool IsUnusedPermutation( const char *compileMacros ) else if ( strcmp( token, "USE_PHYSICAL_MAPPING" ) == 0 ) { if ( !glConfig2.physicalMapping ) return true; + if ( !glConfig2.deluxeMapping ) return true; } else if ( strcmp( token, "USE_REFLECTIVE_SPECULAR" ) == 0 ) { @@ -922,6 +924,7 @@ static bool IsUnusedPermutation( const char *compileMacros ) else if ( strcmp( token, "USE_HEIGHTMAP_IN_NORMALMAP" ) == 0 ) { if ( !glConfig2.reliefMapping && !glConfig2.normalMapping ) return true; + if ( !glConfig2.deluxeMapping ) return true; } }