Skip to content

Commit

Permalink
gl_shader: use glConfig2 instead of cvar (it can be disabled if hardw…
Browse files Browse the repository at this point in the history
…are is too weak)

Use glConfig2 instead of cvar (it can be disabled if hardware is too weak).

Also delete an unused define (the USE_PHYSICAL_MAPPING macro is used instead).
  • Loading branch information
illwieckz committed Aug 15, 2024
1 parent bb6ab60 commit 1974af7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/engine/renderer/gl_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ static std::string GenEngineConstants() {
AddDefine( str, "r_showLightTiles", 1 );
}

if ( r_normalMapping->integer )
if ( glConfig2.normalMapping )
{
AddDefine( str, "r_normalMapping", 1 );
}
Expand All @@ -739,16 +739,11 @@ static std::string GenEngineConstants() {
AddDefine( str, "r_liquidMapping", 1 );
}

if ( r_specularMapping->integer )
if ( glConfig2.specularMapping )
{
AddDefine( str, "r_specularMapping", 1 );
}

if ( r_physicalMapping->integer )
{
AddDefine( str, "r_physicalMapping", 1 );
}

if ( r_glowMapping->integer )
{
AddDefine( str, "r_glowMapping", 1 );
Expand Down

0 comments on commit 1974af7

Please sign in to comment.