summary refs log tree commit diff
path: root/src/World/Generation/ChunkMeshing.cpp
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2023-07-08 01:20:53 +0200
committerMel <einebeere@gmail.com>2023-07-08 01:20:53 +0200
commit41fbca10f6c6cdd9c1623f1347e7ecb40f5e7f59 (patch)
tree7a41651c7c1eeecfc422395cbdb4b26ac619eaf9 /src/World/Generation/ChunkMeshing.cpp
parentf8c0fb7e5d4cd0139b2b287980149eca688803bd (diff)
downloadmeowcraft-41fbca10f6c6cdd9c1623f1347e7ecb40f5e7f59.tar.zst
meowcraft-41fbca10f6c6cdd9c1623f1347e7ecb40f5e7f59.zip
Add crude texture transparency
Diffstat (limited to 'src/World/Generation/ChunkMeshing.cpp')
-rw-r--r--src/World/Generation/ChunkMeshing.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/World/Generation/ChunkMeshing.cpp b/src/World/Generation/ChunkMeshing.cpp
index 0494da4..e065987 100644
--- a/src/World/Generation/ChunkMeshing.cpp
+++ b/src/World/Generation/ChunkMeshing.cpp
@@ -129,11 +129,7 @@ bool is_face_visible(Chunk& chunk, const ChunkMeshing::ChunkNeighbors& neighbors
     }
 
     auto [neighbor] = chunk_to_ask->get(neighbor_pos.x(), neighbor_pos.y(), neighbor_pos.z());
-    if (neighbor == BlockType::Air) {
-        return true;
-    }
-
-    return false;
+    return neighbor.is_transparent();
 }
 
 GFX::Mesh ChunkMeshing::create_mesh_for_chunk(Chunk& chunk, const ChunkNeighbors& neighbors) {