Explorar o código

Lights: Fix regression in non-physical attenuation.

Don McCurdy %!s(int64=6) %!d(string=hai) anos
pai
achega
cb2cd12165
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 );