Skip to content

Commit 5a44a87

Browse files
committed
tr_shader: do b = condition instead of if (!condition) b = false when disabling stages
1 parent f40a900 commit 5a44a87

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/engine/renderer/tr_shader.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5179,10 +5179,7 @@ static void FinishStages()
51795179

51805180
case stageType_t::ST_REFLECTIONMAP:
51815181
case stageType_t::ST_COLLAPSE_REFLECTIONMAP:
5182-
if ( !r_reflectionMapping->integer )
5183-
{
5184-
stage->active = false;
5185-
}
5182+
stage->active = r_reflectionMapping->integer;
51865183
break;
51875184

51885185
case stageType_t::ST_STYLELIGHTMAP:
@@ -5205,10 +5202,7 @@ static void FinishStages()
52055202

52065203
case stageType_t::ST_ATTENUATIONMAP_XY:
52075204
case stageType_t::ST_ATTENUATIONMAP_Z:
5208-
if ( !glConfig2.dynamicLight || r_dynamicLightRenderer.Get() != Util::ordinal( dynamicLightRenderer_t::LEGACY ) )
5209-
{
5210-
stage->active = false;
5211-
}
5205+
stage->active = ( glConfig2.dynamicLight && r_dynamicLightRenderer.Get() != Util::ordinal( dynamicLightRenderer_t::LEGACY ) );
52125206
break;
52135207

52145208
default:

0 commit comments

Comments
 (0)