Explorar o código

Use lerp function to interpolate between logarithmic and uniform split schemes

vtHawk %!s(int64=5) %!d(string=hai) anos
pai
achega
57593dec85
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/jsm/csm/CSM.js

+ 1 - 1
examples/jsm/csm/CSM.js

@@ -133,7 +133,7 @@ export default class CSM {
 
 			for ( let i = 1; i < amount; i ++ ) {
 
-				r.push( lambda * log[ i - 1 ] + ( 1 - lambda ) * uni[ i - 1 ] );
+				r.push( THREE.MathUtils.lerp( uni[ i - 1 ], log[ i - 1 ], lambda ) );
 
 			}