Optimized lighting, frustum culling, generator

- Extended CHUNK_H to 256
- Modified world generator for new world height
- Added simple 2d frustum culling
- Optimized sky lighting calculations
This commit is contained in:
MihailRis
2021-09-17 19:15:14 +03:00
committed by GitHub
parent a11ab33115
commit 01c6c854e1
5 changed files with 64 additions and 18 deletions
+1 -1
View File
@@ -321,7 +321,7 @@ bool Chunks::loadVisible(WorldFiles* worldFiles){
int nearX = 0;
int nearY = 0;
int nearZ = 0;
int minDistance = 1000000000;
int minDistance = (w/2)*(w/2);
for (unsigned int y = 0; y < h; y++){
for (unsigned int z = 1; z < d-1; z++){
for (unsigned int x = 1; x < w-1; x++){