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