소스 검색

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