Huge skylight optimizations. Also fixed the submodules.
This commit is contained in:
@@ -23,21 +23,20 @@ MeshData GenerateChunkMesh(World &world, ChunkRenderData chunkRenderData, Chunk
|
||||
std::vector<unsigned short> indices;
|
||||
|
||||
int face = 0;
|
||||
for (int x = 0; x < CHUNK_SIZE; ++x)
|
||||
for (int y = 0; y < WORLD_HEIGHT; ++y)
|
||||
for (int z = 0; z < CHUNK_SIZE; ++z)
|
||||
for (int index = 0; index < CHUNK_DATA_SIZE; index++)
|
||||
{
|
||||
int index = GetIndexChunk(x,y,z);
|
||||
uint8_t crdata = chunkRenderData.sides[index];
|
||||
if (crdata == 0) continue;
|
||||
|
||||
int x, y, z;
|
||||
GetXYZFromIndex(index, &x, &y, &z);
|
||||
int wx = (chunkWorldX * CHUNK_SIZE + x);
|
||||
int wy = (y);
|
||||
int wz = (chunkWorldY * CHUNK_SIZE + z);
|
||||
|
||||
int this_block = fetch_block(chunk, x,y,z);
|
||||
|
||||
BlockDef definition = BLOCKS[this_block];
|
||||
BlockDef definition = GetBlockDefinition(this_block);
|
||||
|
||||
UVCorners UVside = GetUVTex(definition.textureSide);
|
||||
UVCorners UVtop = GetUVTex(definition.textureTop);
|
||||
|
||||
Reference in New Issue
Block a user