Selaa lähdekoodia

changed normals to world instead of view (#31074)

Victor Troitskii 10 kuukautta sitten
vanhempi
sitoutus
11ff5590f9
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      src/nodes/lighting/HemisphereLightNode.js

+ 2 - 2
src/nodes/lighting/HemisphereLightNode.js

@@ -1,7 +1,7 @@
 import AnalyticLightNode from './AnalyticLightNode.js';
 import { uniform } from '../core/UniformNode.js';
 import { mix } from '../math/MathNode.js';
-import { normalView } from '../accessors/Normal.js';
+import { normalWorld } from '../accessors/Normal.js';
 import { lightPosition } from '../accessors/Lights.js';
 import { renderGroup } from '../core/UniformGroupNode.js';
 
@@ -73,7 +73,7 @@ class HemisphereLightNode extends AnalyticLightNode {
 
 		const { colorNode, groundColorNode, lightDirectionNode } = this;
 
-		const dotNL = normalView.dot( lightDirectionNode );
+		const dotNL = normalWorld.dot( lightDirectionNode );
 		const hemiDiffuseWeight = dotNL.mul( 0.5 ).add( 0.5 );
 
 		const irradiance = mix( groundColorNode, colorNode, hemiDiffuseWeight );

粤ICP备19079148号