From 0464a83dfaebaa75d6e2d3b7431e84ebd83fccfd Mon Sep 17 00:00:00 2001 From: Mel Date: Tue, 18 Oct 2022 19:09:36 +0200 Subject: Hide inward-facing block faces --- src/World/Chunk.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/World/Chunk.hpp') diff --git a/src/World/Chunk.hpp b/src/World/Chunk.hpp index eafc613..0a5f269 100644 --- a/src/World/Chunk.hpp +++ b/src/World/Chunk.hpp @@ -5,8 +5,8 @@ #include "../Mesh.hpp" #include "BlockSide.hpp" -#define CHUNK_WIDTH 8 -#define CHUNK_HEIGHT 8 +#define CHUNK_WIDTH 16 +#define CHUNK_HEIGHT 32 namespace MC { @@ -18,6 +18,8 @@ public: Mesh mesh(); private: + bool is_face_visible(uint32_t x, uint32_t y, uint32_t z, BlockSide side); + static std::array, 4> face_tex_coords(BlockType type, BlockSide side); struct BlockData { -- cgit 1.4.1