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.
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.