From 42401e4e1c34f9ddc7246550227281ec6aeeceac Mon Sep 17 00:00:00 2001 From: Aaditya Dhruv Date: Sat, 31 Jan 2026 15:46:50 -0600 Subject: Add face culling - drastic reduction in rendered faces - Only render faces that are "visible" so - exposed to air essentially. - We also check a neighbor chunk to test if there is a block, and accordigly draw a face in the curr chunk --- src/engine.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/engine.h') diff --git a/src/engine.h b/src/engine.h index 567d9a5..413c74f 100644 --- a/src/engine.h +++ b/src/engine.h @@ -2,14 +2,13 @@ #include "window.h" #include #include "shader.h" -#include "junk/vector.h" // CHUNK_DISTANCE is essentially render distance, it shows you how many chunks // around the user you can see // The number of loaded chunks can be determined as follows: // We want a square around curr_chunk, and a side of the square will be 1 // (center chunk) + 2 * CHUNK_DISTANCE (either side of center) // loaded chunks = (1 + CHUNK_DISTANCE * 2)^2 -#define CHUNK_DISTANCE 5 +#define CHUNK_DISTANCE 0 struct engine { struct window* window; -- cgit