Преглед изворни кода

Remove unnecessary usage of Math.log2, not supported in IE.

Ben Houston пре 10 година
родитељ
комит
29eebde86d
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      examples/js/postprocessing/AdaptiveToneMappingPass.js

+ 1 - 1
examples/js/postprocessing/AdaptiveToneMappingPass.js

@@ -47,7 +47,7 @@ THREE.AdaptiveToneMappingPass = function ( adaptive, resolution ) {
 
 	this.adaptLuminanceShader = {
 		defines: {
-			"MIP_LEVEL_1X1" : Math.log2( this.resolution ).toFixed(1),
+			"MIP_LEVEL_1X1" : ( Math.log( this.resolution ) / Math.log( 2.0 ) ).toFixed(1),
 		},
 		uniforms: {
 			"lastLum": { type: "t", value: null },