Browse Source

Lights: Fix regression in non-physical attenuation.

Don McCurdy 6 năm trước cách đây
mục cha
commit
cb2cd12165
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/renderers/shaders/ShaderChunk/bsdfs.glsl

+ 1 - 1
src/renderers/shaders/ShaderChunk/bsdfs.glsl

@@ -19,7 +19,7 @@ float punctualLightIntensityToIrradianceFactor( const in float lightDistance, co
 
 #else
 
-	if( cutoffDistance > 0.0 ) {
+	if( cutoffDistance > 0.0 && decayExponent > 0.0 ) {
 
 		return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );