From f24780d5fc70ff5cecb680558b194fdde644b2b4 Mon Sep 17 00:00:00 2001 From: SmileTheory Date: Fri, 23 Aug 2013 00:55:28 -0700 Subject: #6004: OpenGL2: Make any CGEN_LIGHTING_DIFFUSE stages use lightall shader. --- src/renderergl2/tr_shader.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/renderergl2') diff --git a/src/renderergl2/tr_shader.c b/src/renderergl2/tr_shader.c index 1ca2fceb..25cf819b 100644 --- a/src/renderergl2/tr_shader.c +++ b/src/renderergl2/tr_shader.c @@ -2516,6 +2516,21 @@ static qboolean CollapseStagesToGLSL(void) } } + // convert any remaining lightingdiffuse stages to a lighting pass + for (i = 0; i < MAX_SHADER_STAGES; i++) + { + shaderStage_t *pStage = &stages[i]; + + if (!pStage->active) + continue; + + if (pStage->rgbGen == CGEN_LIGHTING_DIFFUSE) + { + pStage->glslShaderGroup = tr.lightallShader; + pStage->glslShaderIndex = LIGHTDEF_USE_LIGHT_VECTOR; + } + } + return numStages; } -- cgit