A shader hook block that modifies the world-space properties of each vertex in a shader. This hook can be used inside buildColorShader() and similar shader modify() calls to customize vertex positions, normals, texture coordinates, and colors before rendering. Modifications happen between the .begin() and .end() methods of the hook. "World space" refers to the coordinate system of the 3D scene, before any camera or projection transformations are applied.
worldInputs has 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:
Ejemplos
Referencias Relacionadas
baseColorShader
Returns the default shader used for fills when no lights or textures are activate.
baseFilterShader
Returns the base shader used for filters.
baseMaterialShader
Returns the default shader used for fills when lights or textures are used.
baseNormalShader
Returns the default shader used for fills when normalMaterial() is activated.