mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
db1a2705a3
Adds a per-frame depth-laplacian pass that darkens pixels at sharp depth discontinuities — silhouettes, overlapping-surface boundaries, section-cut edges. Catches the wall-against-wall and slab-against- ceiling cases that the cavity hint in the lighting shader misses. Implementation: - New edge_depth_fbo_ / edge_depth_tex_ — single-sample D24S8 the size of the window. After the main draw, blit the default FB depth into it (handles MSAA resolve in the same call). - Fullscreen triangle generated from gl_VertexID, samples four cardinal neighbours, computes |4c - n - s - e - w| on linearized depth. Linearization branches between perspective and ortho via u_is_ortho. Threshold scales with depth so distant edges still register. - Output is multiplicatively blended (GL_DST_COLOR, GL_ZERO) so colours just darken; no separate composite step. - Runs before the pivot/section/axis gizmos so they aren't outlined themselves. HiZ pyramid build still runs after, unchanged. Per-frame cost is one MSAA depth blit + one fullscreen pass with five depth samples. Sub-millisecond at 1080p on a mid GPU. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>