@@ -1030,7 +1030,7 @@ void BindShaderLightMapping( Material* material ) {
1030
1030
gl_lightMappingShaderMaterial->SetReliefMapping ( material->enableReliefMapping );
1031
1031
/* Reflective specular setting is different here than in ProcessMaterialLightMapping(),
1032
1032
because we don't have cubemaps built yet at this point, but for the purposes of the material ordering there's no difference */
1033
- gl_lightMappingShaderMaterial->SetReflectiveSpecular ( material->enableSpecularMapping && !( tr.refdef .rdflags & RDF_NOCUBEMAP ) );
1033
+ gl_lightMappingShaderMaterial->SetReflectiveSpecular ( glConfig2. reflectionMapping && material->enableSpecularMapping && !( tr.refdef .rdflags & RDF_NOCUBEMAP ) );
1034
1034
gl_lightMappingShaderMaterial->SetPhysicalShading ( material->enablePhysicalMapping );
1035
1035
1036
1036
// Bind shader program.
@@ -1288,8 +1288,6 @@ void ProcessMaterialGeneric3D( Material* material, shaderStage_t* pStage, drawSu
1288
1288
void ProcessMaterialLightMapping ( Material* material, shaderStage_t* pStage, drawSurf_t* drawSurf ) {
1289
1289
material->shader = gl_lightMappingShaderMaterial;
1290
1290
1291
- material->bspSurface = false ;
1292
-
1293
1291
gl_lightMappingShaderMaterial->SetBspSurface ( drawSurf->bspSurface );
1294
1292
1295
1293
lightMode_t lightMode;
@@ -1446,6 +1444,7 @@ void MaterialSystem::ProcessStage( drawSurf_t* drawSurf, shaderStage_t* pStage,
1446
1444
drawSurf->texturesDynamic [stage] = true ;
1447
1445
}
1448
1446
1447
+ material.bspSurface = drawSurf->bspSurface ;
1449
1448
pStage->materialProcessor ( &material, pStage, drawSurf );
1450
1449
1451
1450
std::vector<Material>& materials = materialPacks[materialPack].materials ;
0 commit comments