From e0f5b299414cf8800dd72eaf5ca66367dd024e1d Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Sun, 19 Jul 2026 18:38:54 +0300 Subject: [PATCH] fix(mesh): hide subdivision Mesh face fill in wireframe mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `fill_is_3d` classifier tagged only PolyfaceMesh / PolygonMesh as real 3-D surfaces (fill routed to the 3-D buffer, drawn shaded-only). The modern subdivision Mesh was missing, so its face fill fell into the 2-D overlay buffer that draws in every view mode — showing the shaded faces in wireframe. Add `EntityType::Mesh` to the classifier. Co-Authored-By: Claude Opus 4.8 --- src/scene/convert/tessellate.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/scene/convert/tessellate.rs b/src/scene/convert/tessellate.rs index 7c4245e52..86cbca151 100644 --- a/src/scene/convert/tessellate.rs +++ b/src/scene/convert/tessellate.rs @@ -1107,13 +1107,17 @@ pub fn tessellate( .map(|[x, y, z]| [x, y, z]) .collect(); let (fill_tris, fill_tris_low) = points_to_ds(te.fill_tris); - // Only a real 3-D mesh surface (PolyfaceMesh / PolygonMesh) fill - // renders shaded-only with hidden-surface depth; every other - // `fill_tris` here (a SOLID's filled quad — e.g. a `_BoxFilled` - // arrowhead) is a flat 2-D overlay visible in every view mode. + // Only a real 3-D mesh surface (PolyfaceMesh / PolygonMesh / + // the modern subdivision Mesh) fill renders shaded-only with + // hidden-surface depth; every other `fill_tris` here (a SOLID's + // filled quad — e.g. a `_BoxFilled` arrowhead) is a flat 2-D + // overlay visible in every view mode. Leaving `Mesh` out drops + // its face fill into the 2-D buffer, so it drew in wireframe too. let fill_is_3d = matches!( entity, - EntityType::PolyfaceMesh(_) | EntityType::PolygonMesh(_) + EntityType::PolyfaceMesh(_) + | EntityType::PolygonMesh(_) + | EntityType::Mesh(_) ); // Thickness walls ride on the wire that carries their edges, not // on a wire of their own: they are pick geometry for that entity,