feat(render): double-single fills for the face3d pipeline

Table / PolyfaceMesh / greek-text / mleader-background fills go through
the face3d pipeline; their vertices were single f32 and quantized at UTM
scale. WireModel now carries a fill_tris_low residual (filled by the
tessellate Lines path), Face3DVertex gains position_low (location 3), and
face3d.wgsl reconstructs the eye-relative position from the pair. 3DFACE
quads built from key_vertices use a zero residual (no low source).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-06-23 18:03:40 +03:00
commit c0f3d0de5e
41 changed files with 107 additions and 28 deletions

View file

@ -79,6 +79,9 @@ pub struct WireModel {
/// Pre-triangulated solid fill: flat vertex list, 3 per triangle (world-offset applied).
/// Non-empty only for PolyfaceMesh / PolygonMesh entities.
pub fill_tris: Vec<[f32; 3]>,
/// Low residual paired with [`fill_tris`] (double-single). Empty = all-zero;
/// tessellation from CAD f64 fills it so fills stay precise at UTM scale.
pub fill_tris_low: Vec<[f32; 3]>,
}
impl WireModel {
@ -114,6 +117,7 @@ impl WireModel {
plinegen: true,
vp_scissor: None,
fill_tris: vec![],
fill_tris_low: Vec::new(),
}
}
@ -237,6 +241,7 @@ impl Default for WireModel {
plinegen: true,
vp_scissor: None,
fill_tris: Vec::new(),
fill_tris_low: Vec::new(),
}
}
}