diff options
| author | Mel <einebeere@gmail.com> | 2024-05-19 04:29:14 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-05-19 04:29:14 +0200 |
| commit | 2e6e51fe4a9d7160efdcfc6c9e0df601d0544fb8 (patch) | |
| tree | 79fcaf3c6c26dcdf5ff9f12c2ee7a438b1399c38 /src/World | |
| parent | 3ae8e66ee7c2c488dfe3c32457a26822eba8b236 (diff) | |
| download | meowcraft-main.tar.zst meowcraft-main.zip | |
Diffstat (limited to 'src/World')
| -rw-r--r-- | src/World/Generation/ChunkMeshing.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/World/Generation/ChunkMeshing.hpp b/src/World/Generation/ChunkMeshing.hpp index 16ba701..509909e 100644 --- a/src/World/Generation/ChunkMeshing.hpp +++ b/src/World/Generation/ChunkMeshing.hpp @@ -55,13 +55,13 @@ GFX::Mesh create_mesh(Chunk& chunk, const SurroundingContext& context) { if (!Decisions::is_face_visible(chunk, context, x, y, z, side)) continue; + U32 s = builder.vertex_count(); + builder.positions(Decisions::face_positions(side, x, y, z)); builder.attributes<0>(Decisions::face_normals(side)); builder.attributes<1>(Decisions::face_tex_coords(block.type, side)); builder.attributes<2>(Decisions::face_light(chunk, context, x, y, z, side)); builder.attributes<3>(Decisions::face_ao_values(chunk, context, x, y, z, side)); - - U32 s = builder.vertex_count(); builder.indices(std::array{ s + 0, s + 1, s + 2, s + 2, s + 3, s + 0 }); } |
