Skip to content

Commit

Permalink
renderer/tr_shader: test against cvar value instead of pointer, fix D…
Browse files Browse the repository at this point in the history
…aemonEngine#376, ref DaemonEngine#358

fixes DaemonEngine#376 issue introduced in 76cf787
makes DaemonEngine#358 working as expected
  • Loading branch information
illwieckz committed Oct 12, 2020
1 parent f1b25a8 commit 41707af
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/engine/renderer/tr_shader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1415,12 +1415,12 @@ static bool LoadMap( shaderStage_t *stage, const char *buffer, const int bundleI
token = COM_ParseExt2( &buffer_p, false );

// NOTE: Normal map can ship height map in alpha channel.
if ( ( stage->type == stageType_t::ST_NORMALMAP && !r_normalMapping && !r_reliefMapping )
|| ( stage->type == stageType_t::ST_HEIGHTMAP && !r_reliefMapping )
|| ( stage->type == stageType_t::ST_SPECULARMAP && !r_specularMapping )
|| ( stage->type == stageType_t::ST_PHYSICALMAP && !r_physicalMapping )
|| ( stage->type == stageType_t::ST_GLOWMAP && !r_glowMapping )
|| ( stage->type == stageType_t::ST_REFLECTIONMAP && !r_reflectionMapping ) )
if ( ( stage->type == stageType_t::ST_NORMALMAP && !r_normalMapping->integer && !r_reliefMapping->integer )
|| ( stage->type == stageType_t::ST_HEIGHTMAP && !r_reliefMapping->integer )
|| ( stage->type == stageType_t::ST_SPECULARMAP && !r_specularMapping->integer )
|| ( stage->type == stageType_t::ST_PHYSICALMAP && !r_physicalMapping->integer )
|| ( stage->type == stageType_t::ST_GLOWMAP && !r_glowMapping->integer )
|| ( stage->type == stageType_t::ST_REFLECTIONMAP && !r_reflectionMapping->integer ) )
{
return true;
}
Expand Down

0 comments on commit 41707af

Please sign in to comment.