threejs-worldgen
    Preparing search index...

    Function createLeafMaterial

    • Leaves: alpha-tested cards (texture drawn procedurally for leafShape), vertex colours with per-card variation, per-instance hue / saturation shift and crown thinning (densityVariation), normals that are not flipped on back faces (so a crown shades as one volume), back-lit translucency towards the sun, wind sway plus flutter. Weather: wet leaves darken, snow settles, burn scorches them brown then black and drops them, damage drops leaf mass.

      Parameters

      Returns MeshStandardNodeMaterial