Fixed negative chunks invisible
This commit is contained in:
@@ -61,11 +61,12 @@ namespace Voxel
|
||||
if (_world == null) return;
|
||||
|
||||
int offset = 0;
|
||||
|
||||
foreach (Chunk chunk in _world.GetAllChunks())
|
||||
{
|
||||
ChunkMesh chunkMesh = chunk.GetChunkMesh();
|
||||
|
||||
if (chunkMesh.NeedsUpdate)
|
||||
if (chunkMesh.NeedsUpdate) // always true
|
||||
{
|
||||
byte[] data = chunkMesh.GetPackedData();
|
||||
GL.BufferSubData(BufferTarget.ShaderStorageBuffer, (IntPtr)offset * 8, chunkMesh.Size * 8, data);
|
||||
|
||||
Reference in New Issue
Block a user