mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
BlocksRenderer simplified (part 1)
This commit is contained in:
parent
86ab2d8145
commit
837fd2f32f
3 changed files with 72 additions and 75 deletions
|
|
@ -85,7 +85,7 @@ bool WorldRenderer::drawChunk(size_t index,
|
|||
|
||||
if (!frustumCulling->IsBoxVisible(min, max)) return false;
|
||||
}
|
||||
vec3 coord = vec3(chunk->x*CHUNK_W, 0.0f, chunk->z*CHUNK_D+1);
|
||||
vec3 coord = vec3(chunk->x*CHUNK_W+0.5f, 0.5f, chunk->z*CHUNK_D+0.5f);
|
||||
mat4 model = glm::translate(mat4(1.0f), coord);
|
||||
shader->uniformMatrix("u_model", model);
|
||||
mesh->draw();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue