فهرست منبع

bugfix cycle in shader dependencies

Nicolas Cannasse 4 سال پیش
والد
کامیت
4f68f1d11e
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  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))));
 					}