add renderer prop in onBeforeCompile
@@ -308,7 +308,7 @@
These needs to be disposed by [page:Texture Texture].
</div>
- <h3>[method:null onBeforeCompile]()</h3>
+ <h3>[method:null onBeforeCompile]( [param:Object shader], [param:WebGLRenderer renderer] )</h3>
<div>
An optional callback that is executed immediately before the shader program is compiled.
This function is called with the shader source code as a parameter. Useful for the modification of built-in materials.
@@ -1513,7 +1513,7 @@ function WebGLRenderer( parameters ) {
}
- material.onBeforeCompile( materialProperties.shader );
+ material.onBeforeCompile( materialProperties.shader, _this );
program = programCache.acquireProgram( material, materialProperties.shader, parameters, code );