#6004: OpenGL2: Make any CGEN_LIGHTING_DIFFUSE stages use lightall shader.

This commit is contained in:
SmileTheory 2013-08-23 00:55:28 -07:00
parent d4c6711e51
commit ebd164deaf
1 changed files with 15 additions and 0 deletions

View File

@ -2515,6 +2515,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;
}