![]() |
vkmEngine 1.0.15
A C++ game engine · vkmengine.com
|
Plants a terrain scatters where their density is painted: grass, flowers, shrubs. More...
#include <terrain_asset.h>
Public Attributes | |
| std::vector< TerrainPlantPart > | parts |
| One plant. | |
| std::vector< uint8_t > | density |
| A grid vertex each: 255 is perSquareMetre, 0 none. | |
| float | perSquareMetre = 1.0f |
| Plants a square metre where the density is full. | |
| float | minScale = 0.8f |
| The smallest a plant is drawn, a share of its size. | |
| float | maxScale = 1.2f |
| The largest. | |
| float | maxDistance = 60.0f |
| Metres from the eye past which none is drawn. | |
| uint32_t | seed = 0 |
| Picks where each plant stands and how it turns. | |
| bool | castShadows = false |
| Grass need not; a shrub looks afloat without. | |
Plants a terrain scatters where their density is painted: grass, flowers, shrubs.
Each grid cell gets plants from a hash of its place and the layer's seed, as many as the density at the cell asks, so the same terrain always grows the same plants, on every end.