Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Derive the vertex marker depth bias from screen space

Aperta
#135 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust

Direzione di ricerca

Start by locating VERTEX_MARKER_DEPTH_TOLERANCE and the vertex/edge draw and pick paths; the issue names no files, so trace from viewport task T7 and follow-up #29. Implement the screen-space bias in view space and make picking read the same value, leaving FACE_CENTER_DEPTH_TOLERANCE unchanged. Done when readbacks across viewport sizes, fovs and distances pass, thin-plate occlusion has a documented thickness, and tests pin draw/pick agreement; update the known-issues entry.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area/selection area/viewport type/feature

Follow-up from #29 (Vertex and Edge selection), viewport task T7.

Problem

Vertex markers and the selected-edge strip are drawn with a constant depth bias toward the eye, VERTEX_MARKER_DEPTH_TOLERANCE, which is also the occlusion slack for vertex and edge picking so drawing and picking agree. It is a relative fraction of the linear view distance, currently a flat 6e-3.

The constant is chosen empirically and the margin is thin:

  • Readbacks on an Apple M1 Pro (Metal), 1024 px viewport, 45 degree fov, side-2 cube, near 0.01, far 10000, at the default distance and at distance 120: 6e-3 to 8e-3 draws every visible corner marker fully (25 of 25 pixels) and hides every hidden corner.
  • 5e-3 leaves one visible corner at 20 of 25 pixels.
  • 2e-2 lets a hidden corner draw at distance 120.
  • Only this adapter was measured; CI's software Vulkan job runs the GPU tests but did not bracket the value.

The failures are slope-limited, not depth-resolution-limited: a screen-aligned marker is flat while the faces around a corner are tilted, so part of the marker falls behind the adjacent surface. A world-relative constant cannot track that, which is why it trades see-through (plates thinner than about 0.05 units at the default distance 8 can show or pick a vertex behind them) against clipped markers. An earlier attempt to scale the tolerance with Depth32Float resolution was removed because no readback needed it and it widened see-through at distance.

Proposal

Derive the bias per marker from screen space: roughly (marker size in pixels / viewport height) * tan(fov / 2) * a slope allowance, applied in view space, with picking using the same value so draw and pick stay consistent. Keep FACE_CENTER_DEPTH_TOLERANCE unchanged unless face-centre markers show the same problem.

Acceptance

  • Readbacks at several viewport sizes, fovs and distances (including small and far objects) draw every visible corner marker fully and hide every hidden corner, without per-case tuning.
  • A thin plate in front of a vertex hides it and blocks picking down to a documented thickness that improves on the current about 0.05 units at distance 8.
  • Draw and pick read the same bias; tests pin that.
  • known-issues entry updated with the adapters measured.
Lingua principale
Rust
Stelle
4
Fork
2
Merge medio
2h 44m
PR unite (30g)
59

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cristim/AztecCraft

Tutte le issue di cristim/AztecCraft

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.