浏览代码

Merge pull request #19882 from Mugen87/dev46

WebGLMaterials: Avoid undefined as maxMipLevel uniform value.
Mr.doob 5 年之前
父节点
当前提交
a03577e276
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/renderers/webgl/WebGLMaterials.js

+ 7 - 1
src/renderers/webgl/WebGLMaterials.js

@@ -154,7 +154,13 @@ function WebGLMaterials( properties ) {
 			uniforms.reflectivity.value = material.reflectivity;
 			uniforms.refractionRatio.value = material.refractionRatio;
 
-			uniforms.maxMipLevel.value = properties.get( envMap ).__maxMipLevel;
+			var maxMipLevel = properties.get( envMap ).__maxMipLevel;
+
+			if ( maxMipLevel !== undefined ) {
+
+				uniforms.maxMipLevel.value = maxMipLevel;
+
+			}
 
 		}