mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 03:06:55 -04:00
parent
4dc994ae9d
commit
39bea9a66e
@ -293,8 +293,10 @@ pub const ChunkCompression = struct { // MARK: ChunkCompression
|
||||
for(0..chunk.chunkVolume) |i| {
|
||||
uncompressedData[i] = @intCast(ch.data.data.getValue(i));
|
||||
if(allowLossy) {
|
||||
const model = main.blocks.meshes.model(ch.data.palette[uncompressedData[i]]).model();
|
||||
if(model.allNeighborsOccluded) {
|
||||
const block = ch.data.palette[uncompressedData[i]];
|
||||
const model = main.blocks.meshes.model(block).model();
|
||||
const occluder = model.allNeighborsOccluded and !block.viewThrough();
|
||||
if(occluder) {
|
||||
solidMask[i >> 5] |= @as(u32, 1) << @intCast(i & 31);
|
||||
} else {
|
||||
solidMask[i >> 5] &= ~(@as(u32, 1) << @intCast(i & 31));
|
||||
|
Loading…
x
Reference in New Issue
Block a user