瀏覽代碼

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 },