Explorar o código

bugfix cycle in shader dependencies

Nicolas Cannasse %!s(int64=4) %!d(string=hai) anos
pai
achega
4f68f1d11e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      h3d/shader/pbr/Lighting.hx

+ 1 - 1
h3d/shader/pbr/Lighting.hx

@@ -51,7 +51,7 @@ class Indirect extends PropsDefinition {
 					if( skyColor )
 						color = skyColorValue;
 					else {
-						normal = (vec3( uvToScreen(calculatedUV), 1. ) * cameraInvViewProj.mat3x4()).normalize();
+						var normal = (vec3( uvToScreen(calculatedUV), 1. ) * cameraInvViewProj.mat3x4()).normalize();
 						color = skyMap.get(rotateNormal(normal)).rgb;
 						color.rgb *= mix(1.0, skyScale, (max( max(color.r, max(color.g, color.b)) - skyThreshold, 0) / max(0.001, (1.0 - skyThreshold))));
 					}