diff options
Diffstat (limited to 'src/renderergl2/tr_shader.c')
-rw-r--r-- | src/renderergl2/tr_shader.c | 15 |
1 files changed, 15 insertions, 0 deletions
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; } |