GrassComponent struct in Thread
Procedural grass spawned from a sibling TerrainComponent. Blade positions are baked once into per-chunk instance buffers sampled against the terrain's splat weights, so grass only grows on the layer you pick. Wind, colour gradient and distance fade are evaluated per-frame in the vertex shader — the bake cost is paid once.
Placement
| Enabled | bool | Master switch. |
| SplatLayerIndex | int | Which terrain layer gates growth. |
| SplatThreshold | float | Skip blades where that layer's weight is below this. |
| Density | float | Blades per square metre. |
| Seed | uint32 | RNG seed for repeatable placement. |
Appearance
| MinHeight / MaxHeight | float | Per-blade height range (m). |
| Width | float | Blade width (m). |
| ColorBottom / ColorTop | Vec3 | Root-to-tip colour gradient. |
| ColorVariation | float | Per-blade hue jitter amplitude (0 = uniform). |
| WindStrength / WindFrequency | float | Sway amplitude and speed. |
| MaxDistance / FadeStart | float | Cutoff distance and the fraction of it where fade begins. |
For meshed props (rocks, bushes) rather than blades, use a ScatterComponent.
GrassComponent struct w Thread
Proceduralna trawa wyrastająca z sąsiedniego TerrainComponent. Pozycje źdźbeł są raz wypiekane do buforów instancji per fragment, z uwzględnieniem wag warstw terenu, więc trawa rośnie tylko na wybranej warstwie. Wiatr, gradient koloru i zanikanie z odległością liczy co klatkę vertex shader — koszt wypiekania płacisz raz.
Rozmieszczenie
| Enabled | bool | Główny przełącznik. |
| SplatLayerIndex | int | Która warstwa terenu warunkuje wzrost. |
| SplatThreshold | float | Pomijaj źdźbła tam, gdzie waga tej warstwy jest niższa. |
| Density | float | Źdźbła na metr kwadratowy. |
| Seed | uint32 | Ziarno losowania dla powtarzalnego rozmieszczenia. |
Wygląd
| MinHeight / MaxHeight | float | Zakres wysokości źdźbła (m). |
| Width | float | Szerokość źdźbła (m). |
| ColorBottom / ColorTop | Vec3 | Gradient koloru od nasady do czubka. |
| ColorVariation | float | Amplituda losowej zmiany odcienia źdźbła (0 = jednolite). |
| WindStrength / WindFrequency | float | Amplituda i szybkość kołysania. |
| MaxDistance / FadeStart | float | Odległość odcięcia i ułamek, od którego zaczyna się zanikanie. |
Do obiektów z siatek (kamienie, krzaki) zamiast źdźbeł użyj ScatterComponent.