perf: add distance-dependent terrain mesh LOD

This commit is contained in:
Richard Zink committed 2026-10-13 21:53:16 +02:00
1 parent cf41b72133
commit b906986718
3 files changed
+151 -23

No files matched your search

+6 -1
View File
@@ -262,7 +262,7 @@ Groups:
| `fog.distanceKm` | distance haze (0/false = off) |
| `clouds` | deck height (`top`/`bottom` in world units), `density` per weather level, `wind` motion, soft edge/horizon fading, `maxMarchUnits` and `terrainOcclusion` |
| `flights` | aircraft count, altitudes, speeds, destination weights, contrails, night strobes |
| `terrain` | DEM mesh, `exaggeration`, edge fade/skirt, `outerDem`, `carLights`, `cityLights`, `wireframe` |
| `terrain` | DEM mesh, `exaggeration`, edge fade/skirt, `outerDem`, distance-dependent `lod`, `carLights`, `cityLights`, `wireframe` |
| `carLights` | road width, light sizes, lane separation, traffic range/fade, `trafficSide`, spacing, speed, density, brightness |
| `lights` | twilight switching window of every artificial light (`offDeg`, `onDeg`, `softDeg`) |
| `atmosphere` | turbidity, moon/star gains, night floor, albedo/sky/air gains, haze blocks, cloud albedo/haze, cloud shadows, terrain shadows |
@@ -303,8 +303,13 @@ Other main performance knobs:
- `antialias: false`: disables MSAA.
- `maxFps`: caps the animation loop.
- `clouds.maxMarchUnits`: maximum cloud raymarch length.
- Cloud raymarch uses 48 samples with distance-adaptive spacing: finer near
the camera, coarser toward the march limit.
- `clouds.softEdges`, `edgeSoftness`, `horizonSoftness`: soft cloud edges;
disabling `softEdges` restores the old hard shell behaviour.
- `terrain.lod`: distance-dependent terrain mesh LOD; fine near the centre,
coarser toward the border. Set `terrain.lod.enabled: false` for the old
uniform mesh grid.
- `atmosphere.cloudShadows` and `atmosphere.terrainShadows`: disable if the
scene is GPU-bound.
- `flights.count`, `flights.contrailChance`, `carLights.density`,