Browse Source

Merge pull request #19882 from Mugen87/dev46

WebGLMaterials: Avoid undefined as maxMipLevel uniform value.
Mr.doob 5 năm trước cách đây
mục cha
commit
a03577e276
1 tập tin đã thay đổi với 7 bổ sung1 xóa
  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;
+
+			}
 
 		}