Derive the vertex marker depth bias from screen space
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- computer-graphics
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Rust
- Stars
- 4
- Forks
- 2
- Avg merge
- 3h 46m
- Merged PRs (30d)
- 115
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cristim/AztecCraft
-
Polygon plane is one quad; Maya's default is 5 x 5 subdivisionsPossibly taken @dlobser claimed this today. Openarea/modeling effort/s impact/many priority/p3 severity/low triaged type/bug urgency/this-quarter
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cristim/AztecCraft#176 · 1 comment ·
Maintainers usually reply within 1 day
-
area/modeling effort/m impact/many priority/p3 severity/low triaged type/bug urgency/this-quarter
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
cristim/AztecCraft#175 ·
Maintainers usually reply within 1 day
-
area/ui-parity effort/s impact/many priority/p3 severity/low triaged type/bug urgency/this-quarter
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cristim/AztecCraft#172 · 1 comment ·
Maintainers usually reply within 1 day
-
area/selection effort/s impact/many priority/p3 severity/low triaged type/bug urgency/this-quarter
Difficulty 1/5 Under an hour Newbie friendliness 88/100
cristim/AztecCraft#168 · 1 comment ·
Maintainers usually reply within 1 day
-
Move tool shows no tool settings, so its orientation modes are not visibly unsupportedPossibly taken @RafaelMendes1407 claimed this 1 day ago. Openarea/ui-parity effort/s impact/many priority/p3 severity/low triaged type/bug urgency/this-quarter
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
cristim/AztecCraft#163 · 1 comment ·
Maintainers usually reply within 1 day
All issues in cristim/AztecCraft
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
longbridge/gpui-kit#3620 ·
Maintainers usually reply within 1 day
-
corro-client drops the last byte of a response line that has no trailing newlinePossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
proxy: include denial_category in the "proxy request denied" log linePossibly taken @sreyas-endor claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
nolabs-ai/nono#2172 · 1 comment ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
metasequoiaime/msime#9113 ·
Maintainers usually reply within 1 day
-
[Enhancement] Make use of available space to display more processes when maximized in Memory pageOpen
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
pop-os/cosmic-monitor#126 ·
Maintainers usually reply within 1 day