diff --git a/src/renderer/chunk_meshing.zig b/src/renderer/chunk_meshing.zig index a00172f9..1c474f78 100644 --- a/src/renderer/chunk_meshing.zig +++ b/src/renderer/chunk_meshing.zig @@ -234,6 +234,7 @@ pub fn drawChunksIndirect(chunkIds: *const [main.settings.highestSupportedLod + } fn drawChunksOfLod(chunkIDs: []const u32, projMatrix: Mat4f, ambient: Vec3f, playerPos: Vec3d, transparent: bool) void { + if(chunkIDs.len == 0) return; const drawCallsEstimate: u31 = @intCast(if(transparent) chunkIDs.len else chunkIDs.len*8); var chunkIDAllocation: main.graphics.SubAllocation = .{.start = 0, .len = 0}; chunkIDBuffer.uploadData(chunkIDs, &chunkIDAllocation);