Skip to main content

Interface: SimulatorDepthMaterial

Defined in: src/simulator/scene/SimulatorDepthMaterial.ts:3

Extends​

Methods​

onBeforeCompile()​

onBeforeCompile(shader): void

Defined in: src/simulator/scene/SimulatorDepthMaterial.ts:4

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.

This method can only be used when rendering with WebGLRenderer. The recommended approach when customizing materials is to use WebGPURenderer with the new Node Material system and TSL.

Parameters​

shader​
fragmentShader​

string

uniforms​

object

vertexShader​

string

Returns​

void

Overrides​

THREE.MeshBasicMaterial.onBeforeCompile