feat: wire vertical exaggeration through the shell #13
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user