GrassShader
A game’s own shaping of its grass, in GLSL, spliced in as three’s
onBeforeCompile splices a chunk: Holdfast’s grass gives way to its
cobbled ring and its worn earth, which only its own paint knows.
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
functions? |
string |
GLSL ahead of the vertex shader’s main: the functions shape calls. Each key of uniforms is declared before it. |
shape |
string |
GLSL run for each blade after the engine’s own: it reads bladeRoot, the blade’s root in the world, bladeSeed, 0 to 1 and the blade’s own, groundUp, the y of the ground’s normal there, and coverShare, how much of the ground there grows grass, 0 to 1, and changes bladeHeight, in metres, and bladeColour, in linear light. |
uniforms? |
Record<string, ShaderValue> |
Uniforms by name, each declared ahead of functions: a number, a Vector2, a Vector3, a Color or a Texture. |