2
0
Эх сурвалжийг харах

remove PI factor when using lightmaps in PHYSICAL_LIGHTS mode.

Ben Houston 9 жил өмнө
parent
commit
56b3c8ab08

+ 9 - 1
src/renderers/shaders/ShaderChunk/lights_template.glsl

@@ -87,7 +87,15 @@ IncidentLight directLight;
 
 	#ifdef USE_LIGHTMAP
 
-		irradiance += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; // factor of PI should not be present; included here to prevent breakage
+		#if defined ( PHYSICAL_LIGHTS )
+
+			irradiance += texture2D( lightMap, vUv2 ).xyz * lightMapIntensity;
+
+		#else
+
+			irradiance += PI * texture2D( lightMap, vUv2 ).xyz * lightMapIntensity; // factor of PI should not be present; included here to prevent breakage
+
+		#endif
 
 	#endif