瀏覽代碼

Merge pull request #12267 from stevesan/patch-1

Fairly sure this should be add not subtract :)
Mr.doob 7 年之前
父節點
當前提交
1a00c357f0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/renderers/shaders/ShaderChunk/lights_pars.glsl

+ 1 - 1
src/renderers/shaders/ShaderChunk/lights_pars.glsl

@@ -218,7 +218,7 @@ vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
 		//float desiredMIPLevel = log2( envMapWidth * sqrt( 3.0 ) ) - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );
 
 		float maxMIPLevelScalar = float( maxMIPLevel );
-		float desiredMIPLevel = maxMIPLevelScalar - 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );
+		float desiredMIPLevel = maxMIPLevelScalar + 0.79248 - 0.5 * log2( pow2( blinnShininessExponent ) + 1.0 );
 
 		// clamp to allowable LOD ranges.
 		return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );