mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 06:21:50 +00:00
minimize chunks overdraw
This commit is contained in:
parent
97cf597a01
commit
7ddf3f7537
1 changed files with 1 additions and 1 deletions
|
|
@ -196,7 +196,7 @@ void ChunksRenderer::drawChunks(
|
||||||
shader.uniform1i("u_alphaClip", true);
|
shader.uniform1i("u_alphaClip", true);
|
||||||
|
|
||||||
// TODO: minimize draw calls number
|
// TODO: minimize draw calls number
|
||||||
for (size_t i = 0; i < indices.size(); i++) {
|
for (int i = indices.size()-1; i >= 0; i--) {
|
||||||
auto chunk = chunks.getChunks()[indices[i].index];
|
auto chunk = chunks.getChunks()[indices[i].index];
|
||||||
auto mesh = retrieveChunk(indices[i].index, camera, shader, culling);
|
auto mesh = retrieveChunk(indices[i].index, camera, shader, culling);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue