Skip to content

Commit

Permalink
WebGLMaterials: Moved material.uniformsNeedUpdate back.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed May 11, 2020
1 parent 5db1eb3 commit b063139
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down
4 changes: 4 additions & 0 deletions src/renderers/webgl/WebGLMaterials.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

}

}
Expand Down

0 comments on commit b063139

Please sign in to comment.