feat: wire vertical exaggeration through the shell #13

Merged
moldybits merged 25 commits from feat/terrain-gen-abstraction into main 2026-05-20 23:00:29 -04:00
Showing only changes of commit 09975cac40 - Show all commits
+10
View File
@@ -379,6 +379,16 @@ pub fn render_perspective_with_quality(
if let Some(terrain_h) = sample_height_bilinear(grid, p.x, p.z) {
let terrain_h = terrain_height(scene, terrain_h);
if p.y <= terrain_h {
let nx = if grid_w > 1.0 {
(p.x / (grid_w - 1.0)).clamp(0.0, 1.0)
} else {
0.5
};
let nz = if grid_h > 1.0 {
(p.z / (grid_h - 1.0)).clamp(0.0, 1.0)
} else {
0.5
};
let band = surface_color(scene, terrain_h, nx, nz);
let distance_fade = (t / max_dist).clamp(0.0, 1.0);
let fade = distance_fade * haze_strength;