i did a little memory optimisation (19GB of VRAM -> 2.6GB of VRAM), lost some FPS in vertex rendering as a result but i'll figure it out

This commit is contained in:
Halbear 2026-09-16 20:38:37 +01:00
parent bf9af81f38
commit ce7051d8ca
21 changed files with 766 additions and 592 deletions

View file

@ -7,6 +7,7 @@ const int CHUNK_AREA = CHUNK_SIZE * CHUNK_SIZE;
const int VOXEL_COUNT = CHUNK_SIZE * CHUNK_SIZE * CHUNK_SIZE;
const uint FLOATS_PER_VERTEX = 14u;
const uint INTEGERS_PER_VERTEX = 1u;
const uint VERTICES_PER_FACE = 4u;
const uint INDICES_PER_FACE = 6u;
@ -89,13 +90,12 @@ void emitFace(ivec3 voxelPos, int faceIndex) {
return;
}
vec3 p = vec3(chunkPos * CHUNK_SIZE + voxelPos);
vec3 p = vec3(voxelPos);
vec3 normal;
vec3 tangent;
vec3 bitangent;
vec3 v0;
vec3 v1;
vec3 v2;