From 09f58961fcf808e9999002ae416c7cd12580e6a3 Mon Sep 17 00:00:00 2001 From: Mugen87 Date: Wed, 19 Aug 2020 13:51:57 +0200 Subject: [PATCH] NodeMaterial: Do not access materialProperties. --- examples/jsm/nodes/materials/NodeMaterial.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/examples/jsm/nodes/materials/NodeMaterial.js b/examples/jsm/nodes/materials/NodeMaterial.js index f93db808a723d9..becb54b15ec92d 100644 --- a/examples/jsm/nodes/materials/NodeMaterial.js +++ b/examples/jsm/nodes/materials/NodeMaterial.js @@ -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; };