water shader

This commit is contained in:
2024-06-16 16:30:58 -04:00
parent 8cecad83c2
commit 75da43c8f0
9 changed files with 114 additions and 25 deletions

View File

@@ -95,7 +95,7 @@ impl Map {
let d = (r as f32) / (radius as f32);
let cur = *h;
let h2 = cur - depth;
*h = h2.lerp(cur, d * d);
*h = h2.lerp(cur, d * d).max(0.);
return p.to_chunk_index(width);
});