From 2f9b7cebcdb5960fc0c6ba0788ba50c057e72470 Mon Sep 17 00:00:00 2001 From: EmaMaker Date: Sat, 20 May 2023 21:52:33 +0200 Subject: [PATCH] chunk: make chunk size 32 slight increase in fps with no great increase in ram usage, with greater render distance --- include/camera.hpp | 4 ++-- include/chunk.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/camera.hpp b/include/camera.hpp index ab73bfb..ca35f42 100644 --- a/include/camera.hpp +++ b/include/camera.hpp @@ -17,7 +17,7 @@ public: view = glm::mat4(1.0f); // This matrix needs to be also updated in viewPortCallback whenever it is changed - projection = glm::perspective(glm::radians(90.0f), 800.0f / 600.0f, 0.1f, 200.0f); + projection = glm::perspective(glm::radians(90.0f), 800.0f / 600.0f, 0.1f, 1200.0f); } void update(GLFWwindow *window, float deltaTime) @@ -52,7 +52,7 @@ public: void viewPortCallBack(GLFWwindow *window, int width, int height) { - projection = glm::perspective(glm::radians(80.0f), (float)width / (float)height, 0.1f, 350.0f); + projection = glm::perspective(glm::radians(80.0f), (float)width / (float)height, 0.1f, 1200.0f); } void mouseCallback(GLFWwindow *window, double xpos, double ypos) diff --git a/include/chunk.hpp b/include/chunk.hpp index 303fb31..569a006 100644 --- a/include/chunk.hpp +++ b/include/chunk.hpp @@ -16,7 +16,7 @@ #include "intervalmap.hpp" #include "shader.hpp" -#define CHUNK_SIZE 16 +#define CHUNK_SIZE 32 #define CHUNK_VOLUME (CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE) #define CHUNK_MAX_INDEX (CHUNK_VOLUME - 1)