hex-world
    Preparing search index...

    Variable SCATTER_TEXTURE_VERT_BODYConst

    SCATTER_TEXTURE_VERT_BODY: "\n {\n vec3 stBase = position + modelMatrix[3].xyz;\n #ifdef USE_INSTANCING\n stBase += instanceMatrix[3].xyz;\n #endif\n vScatterTexPos = stBase;\n }\n" = ...

    Vertex half: publish the coordinate the noise is sampled in.

    Built from the raw position attribute, not from transformed. That is the whole trick, and it is deliberate: transformed is what wind sway bends, so sampling it would drag the texture across the surface every time the plant leaned — mottling that swims over a canopy reads as a shader bug even when the motion is small. position never moves, so the pattern is welded to the model.

    The instance origin is added rather than the full instance matrix, which decorrelates one plant from the next without rotating the pattern with them — nobody can tell a wood apart by which way its noise points, and skipping the rotation keeps this to an add.