File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3938,6 +3938,7 @@ static void CollapseStages()
39383938 int specularStage = -1 ;
39393939 int materialStage = -1 ;
39403940 int reflectionStage = -1 ;
3941+ int lightStage = -1 ;
39413942 int glowStage = -1 ;
39423943
39433944 for ( int i = 0 ; i < MAX_SHADER_STAGES; i++ )
@@ -3962,6 +3963,10 @@ static void CollapseStages()
39623963 {
39633964 reflectionStage = i;
39643965 }
3966+ else if ( stages[ i ].type == stageType_t::ST_LIGHTMAP )
3967+ {
3968+ lightStage = i;
3969+ }
39653970 else if ( stages[ i ].type == stageType_t::ST_GLOWMAP )
39663971 {
39673972 glowStage = i;
@@ -4038,6 +4043,14 @@ static void CollapseStages()
40384043 // disable since it's merged
40394044 stages[ materialStage ].active = false ;
40404045 }
4046+ if ( lightStage != -1 )
4047+ {
4048+ // merge with diffuse stage
4049+ stages[ diffuseStage ].rgbGen = stages[ lightStage ].rgbGen ;
4050+ stages[ diffuseStage ].alphaGen = stages[ lightStage ].alphaGen ;
4051+ // disable since it's merged
4052+ stages[ lightStage ].active = false ;
4053+ }
40414054 if ( glowStage != -1 )
40424055 {
40434056 // merge with diffuse stage
You can’t perform that action at this time.
0 commit comments