onBeforeCompile property

Function? onBeforeCompile
getter/setter pair

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.

Unlike properties, the callback is not supported by clone, copy and toJson.

Implementation

Function? onBeforeCompile;