Skip to content

Commit

Permalink
OpenGL2: Generate less shaders when r_sunlightMode is disabled.
Browse files Browse the repository at this point in the history
Original patch by https://github.com/inolen in #36
  • Loading branch information
SmileTheory committed Jan 27, 2017
1 parent 6b514ee commit 468da0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/renderergl2/tr_glsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ void GLSL_InitGPUShaders(void)
if ((i & LIGHTDEF_USE_PARALLAXMAP) && !r_parallaxMapping->integer)
continue;

if (!lightType && (i & LIGHTDEF_USE_SHADOWMAP))
if ((i & LIGHTDEF_USE_SHADOWMAP) && (!lightType || !r_sunlightMode->integer))
continue;

attribs = ATTR_POSITION | ATTR_TEXCOORD | ATTR_COLOR | ATTR_NORMAL;
Expand Down

0 comments on commit 468da0f

Please sign in to comment.