Explorar o código

Merge pull request #13178 from cnspaha/patch-8

GLTFLoader: only refresh uniforms on correct material
Mr.doob %!s(int64=7) %!d(string=hai) anos
pai
achega
f09e1a6a9b
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      examples/js/loaders/GLTFLoader.js

+ 6 - 0
examples/js/loaders/GLTFLoader.js

@@ -606,6 +606,12 @@ THREE.GLTFLoader = ( function () {
 			// Here's based on refreshUniformsCommon() and refreshUniformsStandard() in WebGLRenderer.
 			refreshUniforms: function ( renderer, scene, camera, geometry, material, group ) {
 
+				if ( material.isGLTFSpecularGlossinessMaterial !== true ) {
+
+					return;
+
+				}
+
 				var uniforms = material.uniforms;
 				var defines = material.defines;