Section Analysis cut faces hide the inside of the body: the cap was drawn on the far walls' back faces at their own depth, so every edge between the cut and the far wall (hole and boss edges, corner seams) showed through it like a pane of glass. While a section is shown the solids mark in the stencil where the cap is the visible surface, then draw the cap again there at the depth where the view ray meets the section plane (orthographic and perspective), so holes stay open and the inside is hidden. The native app asks for an 8-bit stencil; without one (eframe's web painter has none) the cap draws as before. Not covered by an automated test (no GPU in the test suite); checked in the app with before/after screenshots

This commit is contained in:
CypherNaugh_0x authored and bherbruck committed 2026-10-10 13:51:00 -04:00
1 parent b1ec9fc1ce
commit b5fd55cce6
5 files changed
+121 -34

No files matched your search

+4 -1
View File
@@ -94,6 +94,8 @@ fn msaa() -> u16 {
const CUSTOM_TITLEBAR: bool = !cfg!(target_os = "macos");
const DEPTH_BITS: u8 = 24;
/// The section cap marks where it shows in the stencil.
const STENCIL_BITS: u8 = 8;
const MSAA: u16 = 4;
fn main() -> eframe::Result {
@@ -129,6 +131,7 @@ fn main() -> eframe::Result {
.with_title_shown(false)
.with_app_id("ai.storyteller.solvecraft"),
depth_buffer: DEPTH_BITS,
stencil_buffer: STENCIL_BITS,
multisampling: samples,
..Default::default()
};
@@ -155,7 +158,7 @@ fn main() -> eframe::Result {
app.load_prefs(&p);
}
if let Some(rs) = &cc.wgpu_render_state {
app.set_wgpu(rs, DEPTH_BITS, u32::from(samples));
app.set_wgpu(rs, DEPTH_BITS, STENCIL_BITS, u32::from(samples));
}
if let Some(port) = control_port {
let rx = control_server::start(port, cc.egui_ctx.clone());