mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-22 19:05:48 -04:00
parent
b6dc901e69
commit
7efa37029b
@ -430,7 +430,11 @@ fn addQuad(info_: QuadInfo) error{Degenerate}!u16 {
|
|||||||
}
|
}
|
||||||
if(cornerEqualities >= 2) return error.Degenerate; // One corner equality is fine, since then the quad degenerates to a triangle, which has a non-zero area.
|
if(cornerEqualities >= 2) return error.Degenerate; // One corner equality is fine, since then the quad degenerates to a triangle, which has a non-zero area.
|
||||||
const index: u16 = @intCast(quads.items.len);
|
const index: u16 = @intCast(quads.items.len);
|
||||||
info.opaqueInLod = @intFromBool(Model.getFaceNeighbor(&info) != null);
|
if(info.opaqueInLod == 2) {
|
||||||
|
info.opaqueInLod = 0;
|
||||||
|
} else {
|
||||||
|
info.opaqueInLod = @intFromBool(Model.getFaceNeighbor(&info) != null);
|
||||||
|
}
|
||||||
quads.append(info);
|
quads.append(info);
|
||||||
quadDeduplication.put(std.mem.toBytes(info), index) catch unreachable;
|
quadDeduplication.put(std.mem.toBytes(info), index) catch unreachable;
|
||||||
|
|
||||||
|
@ -975,6 +975,7 @@ pub const RotationModes = struct {
|
|||||||
for(0..len) |i| {
|
for(0..len) |i| {
|
||||||
quadList.append(quadList.items[i]);
|
quadList.append(quadList.items[i]);
|
||||||
quadList.items[i + len].textureSlot += 16;
|
quadList.items[i + len].textureSlot += 16;
|
||||||
|
quadList.items[i].opaqueInLod = 2;
|
||||||
}
|
}
|
||||||
const modelIndex = main.models.Model.init(quadList.items);
|
const modelIndex = main.models.Model.init(quadList.items);
|
||||||
modelCache = modelIndex;
|
modelCache = modelIndex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user