Skip to content

Commit

Permalink
Merge pull request #20126 from Mugen87/dev46
Browse files Browse the repository at this point in the history
NodeMaterial: Do not access materialProperties.
  • Loading branch information
mrdoob committed Aug 19, 2020
2 parents 2c61295 + 09f5896 commit b67ceb2
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions examples/jsm/nodes/materials/NodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,11 @@ Object.defineProperties( NodeMaterial.prototype, {

NodeMaterial.prototype.onBeforeCompile = function ( shader, renderer ) {

var materialProperties = renderer.properties.get( this );
this.build( { renderer: renderer } );

if ( this.version !== materialProperties.__version ) {

this.build( { renderer: renderer } );

shader.uniforms = this.uniforms;
shader.vertexShader = this.vertexShader;
shader.fragmentShader = this.fragmentShader;

}
shader.uniforms = this.uniforms;
shader.vertexShader = this.vertexShader;
shader.fragmentShader = this.fragmentShader;

};

Expand Down

0 comments on commit b67ceb2

Please sign in to comment.