Skip to content

Commit ddc2f39

Browse files
committed
Update mesher
1 parent 277ac21 commit ddc2f39

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/client/terrain/util/cube_mesher.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,16 @@ pub fn create_cube_mesh_for_chunk(chunk: &Chunk, texture_manager: &TextureManage
8989

9090
let mut mask = 0b000000;
9191

92-
if y > 0 {
92+
if y >= 1 {
9393
update_mask(chunk, &mut mask, 0b000010, x, y - 1, z);
94+
} else {
95+
// Don't render faces at bottom of world
9496
}
9597

96-
if y < CHUNK_HEIGHT {
98+
if y < CHUNK_HEIGHT - 1 {
9799
update_mask(chunk, &mut mask, 0b000001, x, y + 1, z);
100+
} else {
101+
mask |= 0b000001
98102
}
99103

100104
update_mask(chunk, &mut mask, 0b000100, x + 1, y, z);

0 commit comments

Comments
 (0)