Optional
__setOptional
computeCustom cache key to use for this material extension.
A different cache key will cause the shader to be recompiled.
Check three.js docs for more info.
Value can be a string or a function that returns a string
This will only be checked if material.needsUpdate
is true
, not on every render.
Note: extension might never be registered if an empty string is returned.
Optional
extraExtra defines to copy to material Note: boolean are converted to 0 and 1
Optional
extraExtra uniforms to copy to material
Optional
getFunction to return the UI config for this material extension. This is called once when the material extension is registered.
Function to return the UI config for this material extension. This is called once when the material extension is registered.
Optional
refreshUi: ((deep?, mode?, delay?) => void)Optional
deep: booleanOptional
mode: TUiRefreshModes | "immediate"Optional
delay: numberFunction to check if this material extension is compatible with the given material. If not compatible, the material extension will not be applied. This is only checked when the extension is registered.
Function to check if this material extension is compatible with the given material. If not compatible, the material extension will not be applied. This is only checked when the extension is registered.
Optional
onCustom callback to run code after the material is rendered
Executes from material.onAfterRender
for each material for each object it's rendered on.
Custom callback to run code after the material is rendered
Executes from material.onAfterRender
for each material for each object it's rendered on.
Optional
onCustom callback to run code before the material is rendered
Executes from material.onBeforeRender
for each material for each object it's rendered on.
Custom callback to run code before the material is rendered
Executes from material.onBeforeRender
for each material for each object it's rendered on.
Optional
parsExtra code to add to the top of the fragment shader Value can be a string or a function that returns a string
Optional
renderer: WebGLRendererOptional
material: IMaterial<IMaterialEvent<IMaterialEventTypes>, IMaterialEventTypes>Optional
parsExtra code to add to the top of the vertex shader Value can be a string or a function that returns a string
Optional
renderer: WebGLRendererOptional
material: IMaterial<IMaterialEvent<IMaterialEventTypes>, IMaterialEventTypes>Optional
priorityHigher priority extensions are applied first.
Optional
setOptional
shaderCustom callback to extend/modify/replace shader code and other shader properties
Custom callback to extend/modify/replace shader code and other shader properties
Optional
updateOptional
updatersList of shader properties updaters to run on the material.
Optional
uuidGenerated using TypeDoc
Material extension interface This is used to extend a three.js material satisfying the IMaterial interface, with extra uniforms, defines, shader code, etc.