forked from 1b-agent/opencadstudio-upstream
fix(wipeout): frame draws above the mask; mask joins the draw order
The wipeout pass ran after the wire pass with no draw-order bias, so the mask erased its own boundary frame (and everything else at its plane regardless of draw order). The mask uniform now carries the entity's draw-order depth (uniform grows 80 → 96 bytes) and biases its clip-z like every other pipeline, and the frame wire rides a +half-rank override — the later mask pass fails the depth test at the frame's pixels, so the boundary stays visible, while entities drawn above the wipeout are no longer erased. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
f72852e94b
commit
fd2607452d
4 files changed
+27
-3
No files matched your search
+7
-1
@@ -1032,6 +1032,7 @@ impl Scene {
|
||||
// epoch boundary and never re-evaluate as the user pans. The
|
||||
// pipeline's `wipeout_skip_flags` (compute_wipeout_lod) does
|
||||
// the per-frame skip at draw time instead.
|
||||
let depth_map = self.draw_depth_map();
|
||||
let mut models = Vec::new();
|
||||
for entity in self.document.entities() {
|
||||
let EntityType::Wipeout(wo) = entity else {
|
||||
@@ -1072,7 +1073,12 @@ impl Scene {
|
||||
angle_offset: 0.0,
|
||||
scale: 1.0,
|
||||
world_origin: fill_origin,
|
||||
draw_depth: 0.0,
|
||||
// The mask erases what draws below the wipeout and loses
|
||||
// to what draws above — including its own frame wire,
|
||||
// which rides a +half-rank override on top of this.
|
||||
draw_depth: depth_map
|
||||
.get(&wo.common.handle.value())
|
||||
.map_or(0.0, |d| d[0]),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user