hex-world
    Preparing search index...

    Function createRockMaterial

    • Lambert material for scatter rocks with per-instance shape variation.

      Each instance is non-uniformly scaled in the vertex shader using a hash seeded from its world position (extracted from instanceMatrix). This gives every rock a unique squashed/stretched silhouette with zero CPU overhead and no extra buffer attributes.

      flatShading: true means the fragment shader derives normals from screen-space position derivatives, so lighting is always correct for the deformed geometry without needing a separate normal-correction pass.

      Parameters

      • color: number = 0x888880

      Returns MeshLambertMaterial