diff options
| author | Aaditya Dhruv <[email protected]> | 2026-01-31 15:46:50 -0600 |
|---|---|---|
| committer | Aaditya Dhruv <[email protected]> | 2026-01-31 15:46:50 -0600 |
| commit | 42401e4e1c34f9ddc7246550227281ec6aeeceac (patch) | |
| tree | f9dc68a455f05257b1138702fb51d3ef6344ac03 /src/engine.h | |
| parent | 7f13b0abaa76a5e90674d5733f8162f02ceab693 (diff) | |
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
Diffstat (limited to 'src/engine.h')
| -rw-r--r-- | src/engine.h | 3 |
1 files changed, 1 insertions, 2 deletions
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 <ft2build.h> #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; |
