fix(render): hide PolyfaceMesh outline edges in shaded modes
PolyfaceMesh / PolygonMesh için outline edges WireModel.points üzerinden gpu_wires'a giriyor; bu nedenle FlatShaded / GouraudShaded modlarında shaded yüzeyin üstünde görünmeye devam ediyordu. WireGpu artık kaynak WireModel'da fill_tris doluysa 'is_3d_mesh_edge' bayrağını set ediyor; wire pass'i show_3d_edges=false iken bu instance'ları atlıyor. *WithEdges, Wireframe ve HiddenLine modları show_3d_edges=true ile geliyor — mesh kenarları orada görünür kalır. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
132efe6574
commit
3a64f98755
2 changed files with 18 additions and 0 deletions
|
|
@ -1394,6 +1394,15 @@ impl Pipeline {
|
|||
if wire.instance_count == 0 {
|
||||
continue;
|
||||
}
|
||||
// PolyfaceMesh / PolygonMesh outline edges live in
|
||||
// `gpu_wires` (their `WireModel` has both `points` and
|
||||
// `fill_tris`). In FlatShaded / GouraudShaded the user
|
||||
// wants a clean shaded surface, so the wire pass skips
|
||||
// these instances; the *WithEdges and pure wireframe
|
||||
// modes leave the flag at true and draw them.
|
||||
if !show_3d_edges && wire.is_3d_mesh_edge {
|
||||
continue;
|
||||
}
|
||||
match self.wire_pixel_scissors.get(i) {
|
||||
Some(Some([x, y, w, h])) => {
|
||||
pass.set_scissor_rect(*x, *y, *w, *h);
|
||||
|
|
|
|||
Loading…
Reference in a new issue