feat(render): double-single vertices for the mesh pipeline

3D solid / surface meshes were the last single-f32 path. truck's mesh
tessellation now returns a paired verts_low residual (TruckTessResult::Mesh,
polygon_to_result), MeshModel/MeshLodSet carry it, the model-space offset
and block-instance transforms reconstruct the f64 position and re-split it
after subtracting world_offset, MeshVertex gains position_low (location 3),
and mesh.wgsl reconstructs the eye-relative position. Native SAT / ACIS /
OBJ mesh paths default to a zero residual (no regression — they were never
sub-f32 precise).

With this every world-space pipeline (wire, hatch, image, face3d, mesh)
is full double-single relative-to-eye; large-coordinate jitter is gone.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.7 committed 2026-06-23 18:28:52 +03:00
1 parent c0f3d0de5e
commit ddf6344dbe
10 files changed
+112 -46

No files matched your search

+14
View File
@@ -1274,11 +1274,13 @@ impl OpenCADStudio {
match truck_tess::tessellate_solid(&solid, woff) {
truck_tess::TruckTessResult::Mesh {
verts,
verts_low,
normals,
indices,
} => Some(crate::scene::model::mesh_model::MeshModel {
name: String::new(),
verts,
verts_low,
normals,
indices,
color,
@@ -1352,11 +1354,13 @@ impl OpenCADStudio {
match truck_tess::tessellate_shell(&shell, woff) {
truck_tess::TruckTessResult::Mesh {
verts,
verts_low,
normals,
indices,
} => Some(crate::scene::model::mesh_model::MeshModel {
name: String::new(),
verts,
verts_low,
normals,
indices,
color,
@@ -1437,11 +1441,13 @@ impl OpenCADStudio {
match truck_tess::tessellate_solid(&solid, woff) {
truck_tess::TruckTessResult::Mesh {
verts,
verts_low,
normals,
indices,
} => Some(crate::scene::model::mesh_model::MeshModel {
name: String::new(),
verts,
verts_low,
normals,
indices,
color,
@@ -1454,11 +1460,13 @@ impl OpenCADStudio {
match truck_tess::tessellate_shell(&shell, woff) {
truck_tess::TruckTessResult::Mesh {
verts,
verts_low,
normals,
indices,
} => Some(crate::scene::model::mesh_model::MeshModel {
name: String::new(),
verts,
verts_low,
normals,
indices,
color,
@@ -1486,11 +1494,13 @@ impl OpenCADStudio {
match truck_tess::tessellate_solid(&solid, woff) {
truck_tess::TruckTessResult::Mesh {
verts,
verts_low,
normals,
indices,
} => Some(crate::scene::model::mesh_model::MeshModel {
name: String::new(),
verts,
verts_low,
normals,
indices,
color,
@@ -1503,11 +1513,13 @@ impl OpenCADStudio {
match truck_tess::tessellate_shell(&shell, woff) {
truck_tess::TruckTessResult::Mesh {
verts,
verts_low,
normals,
indices,
} => Some(crate::scene::model::mesh_model::MeshModel {
name: String::new(),
verts,
verts_low,
normals,
indices,
color,
@@ -1593,11 +1605,13 @@ impl OpenCADStudio {
match truck_tess::tessellate_shell(&shell, woff) {
truck_tess::TruckTessResult::Mesh {
verts,
verts_low,
normals,
indices,
} => Some(crate::scene::model::mesh_model::MeshModel {
name: String::new(),
verts,
verts_low,
normals,
indices,
color,