diff options
author | SmileTheory <SmileTheory@gmail.com> | 2013-08-23 00:55:28 -0700 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2014-06-17 17:43:33 +0100 |
commit | f24780d5fc70ff5cecb680558b194fdde644b2b4 (patch) | |
tree | 25ade525adce43cb889c45c291d969b373712d1c /src/renderergl2 | |
parent | 6be2f73daf11da58131ba6dca879aa50c39dc670 (diff) |
#6004: OpenGL2: Make any CGEN_LIGHTING_DIFFUSE stages use lightall shader.
Diffstat (limited to 'src/renderergl2')
-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; } |