experimenting with water surface mesh

This commit is contained in:
2024-10-19 01:33:03 -04:00
parent b61dacf5e2
commit cc3e43da16
17 changed files with 263 additions and 124 deletions

View File

@@ -224,7 +224,7 @@ fn sample_ground(pos: Vec3, heightmap: &Map) -> f32 {
let mut ground_height = if heightmap.is_in_bounds(&tile_under) {
heightmap.sample_height(&tile_under)
} else {
heightmap.sea_level
heightmap.sealevel
};
for n in neighbors {
@@ -234,8 +234,8 @@ fn sample_ground(pos: Vec3, heightmap: &Map) -> f32 {
}
}
}
if ground_height < heightmap.sea_level {
ground_height = heightmap.sea_level;
if ground_height < heightmap.sealevel {
ground_height = heightmap.sealevel;
}
return ground_height;
}