Browse Source

Use lerp function to interpolate between logarithmic and uniform split schemes

vtHawk 5 years ago
parent
commit
57593dec85
1 changed files with 1 additions and 1 deletions
  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 ++ ) {
 			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 ) );
 
 
 			}
 			}