From b063139c82164382aa5572b0aa7e3f3e91cc06d2 Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Mon, 11 May 2020 15:47:43 -0700 Subject: [PATCH] WebGLMaterials: Moved material.uniformsNeedUpdate back. --- src/renderers/WebGLRenderer.js | 6 ------ src/renderers/webgl/WebGLMaterials.js | 4 ++++ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/renderers/WebGLRenderer.js b/src/renderers/WebGLRenderer.js index ec9c1417a71731..9cdcbc2e795fb5 100644 --- a/src/renderers/WebGLRenderer.js +++ b/src/renderers/WebGLRenderer.js @@ -1875,12 +1875,6 @@ function WebGLRenderer( parameters ) { WebGLUniforms.upload( _gl, materialProperties.uniformsList, m_uniforms, textures ); - if ( material.isShaderMaterial ) { - - material.uniformsNeedUpdate = false; // #15581 - - } - } if ( material.isShaderMaterial && material.uniformsNeedUpdate === true ) { diff --git a/src/renderers/webgl/WebGLMaterials.js b/src/renderers/webgl/WebGLMaterials.js index a3a327448915c5..1a64c1bff3264c 100644 --- a/src/renderers/webgl/WebGLMaterials.js +++ b/src/renderers/webgl/WebGLMaterials.js @@ -101,6 +101,10 @@ function WebGLMaterials( properties ) { uniforms.color.value.copy( material.color ); uniforms.opacity.value = material.opacity; + } else if ( material.isShaderMaterial ) { + + material.uniformsNeedUpdate = false; // #15581 + } }