File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3936,6 +3936,7 @@ static void CollapseStages()
39363936 int specularStage = -1 ;
39373937 int materialStage = -1 ;
39383938 int reflectionStage = -1 ;
3939+ int lightStage = -1 ;
39393940 int glowStage = -1 ;
39403941
39413942 for ( int i = 0 ; i < MAX_SHADER_STAGES; i++ )
@@ -3960,6 +3961,10 @@ static void CollapseStages()
39603961 {
39613962 reflectionStage = i;
39623963 }
3964+ else if ( stages[ i ].type == stageType_t::ST_LIGHTMAP )
3965+ {
3966+ lightStage = i;
3967+ }
39633968 else if ( stages[ i ].type == stageType_t::ST_GLOWMAP )
39643969 {
39653970 glowStage = i;
@@ -4035,6 +4040,14 @@ static void CollapseStages()
40354040 // disable since it's merged
40364041 stages[ materialStage ].active = false ;
40374042 }
4043+ if ( lightStage != -1 )
4044+ {
4045+ // merge with diffuse stage
4046+ stages[ diffuseStage ].rgbGen = stages[ lightStage ].rgbGen ;
4047+ stages[ diffuseStage ].alphaGen = stages[ lightStage ].alphaGen ;
4048+ // disable since it's merged
4049+ stages[ lightStage ].active = false ;
4050+ }
40384051 if ( glowStage != -1 )
40394052 {
40404053 // merge with diffuse stage
You can’t perform that action at this time.
0 commit comments