Skip to content

Commit

Permalink
gl_shader: more unused GLSL permutation detection
Browse files Browse the repository at this point in the history
  • Loading branch information
illwieckz committed Aug 15, 2024
1 parent 4d7843b commit bb6ab60
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/engine/renderer/gl_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand All @@ -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 )
{
Expand All @@ -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;
}
}

Expand Down

0 comments on commit bb6ab60

Please sign in to comment.