Registers a callback to modify the world-space properties of each vertex in a shader. This hook can be used inside baseColorShader().modify() and similar shader modify() calls to customize vertex positions, normals, texture coordinates, and colors before rendering. "World space" refers to the coordinate system of the 3D scene, before any camera or projection transformations are applied.
The callback receives a vertex object with the following properties:
position: a three-component vector representing the original position of the vertex.normal: a three-component vector representing the direction the surface is facing.texCoord: a two-component vector representing the texture coordinates.color: a four-component vector representing the color of the vertex (red, green, blue, alpha).
This hook is available in:
Examples
Syntax
getWorldInputs(callback)
Parameters
Related References
combineColors
Registers a callback to customize how color components are combined in the fragment shader.
getCameraInputs
Registers a callback to adjust vertex properties after the model has been transformed by the camera, but before projection, in the vertex shader.
getColor
Registers a callback to set the final color for each pixel in a filter shader.
getFinalColor
Registers a callback to change the final color of each pixel after all lighting and mixing is done in the fragment shader.