mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
cleanup
This commit is contained in:
parent
895a496f6e
commit
2475a7e8f5
20 changed files with 88 additions and 79 deletions
|
|
@ -241,7 +241,7 @@ void ChunksRenderer::drawShadowsPass(
|
|||
continue;
|
||||
}
|
||||
glm::ivec2 pos {chunk->x, chunk->z};
|
||||
const auto& found = meshes.find({chunk->x, chunk->z});
|
||||
const auto& found = meshes.find(pos);
|
||||
if (found == meshes.end()) {
|
||||
continue;
|
||||
}
|
||||
|
|
@ -250,11 +250,11 @@ void ChunksRenderer::drawShadowsPass(
|
|||
pos.x * CHUNK_W + 0.5f, 0.5f, pos.y * CHUNK_D + 0.5f
|
||||
);
|
||||
|
||||
glm::vec3 min(chunk->x * CHUNK_W, chunk->bottom, chunk->z * CHUNK_D);
|
||||
glm::vec3 min(pos.x * CHUNK_W, chunk->bottom, pos.y * CHUNK_D);
|
||||
glm::vec3 max(
|
||||
chunk->x * CHUNK_W + CHUNK_W,
|
||||
pos.x * CHUNK_W + CHUNK_W,
|
||||
chunk->top,
|
||||
chunk->z * CHUNK_D + CHUNK_D
|
||||
pos.y * CHUNK_D + CHUNK_D
|
||||
);
|
||||
|
||||
if (!frustum.isBoxVisible(min, max)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue