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 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-07-23 07:23:10 +03:00
commit fd2607452d
4 changed files with 27 additions and 3 deletions

View file

@ -1341,6 +1341,13 @@ pub(crate) fn tessellate_entity(
w.name = host_name.clone();
w.aci = aci;
set_wire_aabb(w, aabb);
// A wipeout's frame sits ABOVE its own mask: the mask
// draws at the entity's rank, the frame half a rank
// closer, so the later mask pass fails the depth test at
// the frame's pixels instead of erasing it.
if matches!(e, EntityType::Wipeout(_)) {
w.depth_override = Some(0.5);
}
}
bases.extend(wires);
}