mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 14:41:42 +00:00
#5999: OpenGL2: Don't use lightall shader with deforms or adjustColorsForFog.
This commit is contained in:
parent
ebd164deaf
commit
d46916082d
1 changed files with 19 additions and 10 deletions
|
@ -2493,7 +2493,7 @@ static qboolean CollapseStagesToGLSL(void)
|
|||
|
||||
// convert any remaining lightmap stages to a lighting pass with a white texture
|
||||
// only do this with r_sunlightMode non-zero, as it's only for correct shadows.
|
||||
if (r_sunlightMode->integer)
|
||||
if (r_sunlightMode->integer && shader.numDeforms == 0)
|
||||
{
|
||||
for (i = 0; i < MAX_SHADER_STAGES; i++)
|
||||
{
|
||||
|
@ -2502,6 +2502,9 @@ static qboolean CollapseStagesToGLSL(void)
|
|||
if (!pStage->active)
|
||||
continue;
|
||||
|
||||
if (pStage->adjustColorsForFog)
|
||||
continue;
|
||||
|
||||
if (pStage->bundle[TB_DIFFUSEMAP].isLightmap)
|
||||
{
|
||||
pStage->glslShaderGroup = tr.lightallShader;
|
||||
|
@ -2516,17 +2519,23 @@ static qboolean CollapseStagesToGLSL(void)
|
|||
}
|
||||
|
||||
// convert any remaining lightingdiffuse stages to a lighting pass
|
||||
for (i = 0; i < MAX_SHADER_STAGES; i++)
|
||||
if (shader.numDeforms == 0)
|
||||
{
|
||||
shaderStage_t *pStage = &stages[i];
|
||||
|
||||
if (!pStage->active)
|
||||
continue;
|
||||
|
||||
if (pStage->rgbGen == CGEN_LIGHTING_DIFFUSE)
|
||||
for (i = 0; i < MAX_SHADER_STAGES; i++)
|
||||
{
|
||||
pStage->glslShaderGroup = tr.lightallShader;
|
||||
pStage->glslShaderIndex = LIGHTDEF_USE_LIGHT_VECTOR;
|
||||
shaderStage_t *pStage = &stages[i];
|
||||
|
||||
if (!pStage->active)
|
||||
continue;
|
||||
|
||||
if (pStage->adjustColorsForFog)
|
||||
continue;
|
||||
|
||||
if (pStage->rgbGen == CGEN_LIGHTING_DIFFUSE)
|
||||
{
|
||||
pStage->glslShaderGroup = tr.lightallShader;
|
||||
pStage->glslShaderIndex = LIGHTDEF_USE_LIGHT_VECTOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue