Browse Source

fix change code after onBeforeCompile ( sharing old code )

sunag 7 years ago
parent
commit
c169b65d9a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/renderers/WebGLRenderer.js

+ 2 - 0
src/renderers/WebGLRenderer.js

@@ -1471,6 +1471,8 @@ function WebGLRenderer( parameters ) {
 
 			material.onBeforeCompile( materialProperties.shader, _this );
 
+			code = programCache.getProgramCode( material, parameters );
+
 			program = programCache.acquireProgram( material, materialProperties.shader, parameters, code );
 
 			materialProperties.program = program;