mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +00:00
Fixed zoom, changed camera shaking parameters
This commit is contained in:
parent
cdc8a26a30
commit
1dd9a72fb3
4 changed files with 38 additions and 16 deletions
|
|
@ -295,7 +295,7 @@ Mesh* VoxelRenderer::render(Chunk* chunk, const Chunk** chunks){
|
|||
for (int z = 0; z < CHUNK_D; z++){
|
||||
for (int x = 0; x < CHUNK_W; x++){
|
||||
voxel vox = chunk->voxels[(y * CHUNK_D + z) * CHUNK_W + x];
|
||||
if (vox.id == 9)
|
||||
if (vox.id == 9 || vox.id == 4)
|
||||
continue;
|
||||
_renderBlock(buffer, x, y, z, chunks, vox, index);
|
||||
}
|
||||
|
|
@ -312,5 +312,16 @@ Mesh* VoxelRenderer::render(Chunk* chunk, const Chunk** chunks){
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int y = 0; y < CHUNK_H; y++){
|
||||
for (int z = 0; z < CHUNK_D; z++){
|
||||
for (int x = 0; x < CHUNK_W; x++){
|
||||
voxel vox = chunk->voxels[(y * CHUNK_D + z) * CHUNK_W + x];
|
||||
if (vox.id != 4)
|
||||
continue;
|
||||
_renderBlock(buffer, x, y, z, chunks, vox, index);
|
||||
}
|
||||
}
|
||||
}
|
||||
return new Mesh(buffer, index / VERTEX_SIZE, chunk_attrs);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue