Skip to content

Commit 080d2e4

Browse files
committed
fix(npf): port DS halo-under-rim cross-fade AA to kill the sphere seam ring
The node-graph glow-halo pass started exactly at the sphere edge (discard r<1.0) while the body's antialiased rim feathers to alpha 0 by r=1 — leaving the ~1px feather band lit by neither, so the dark page showed through as a 1-2px seam ring around every sphere (glaring when the halo flared red). This is the antialiasing defect vs the GRCE Design System canvas. Surgical port of the DS fix: only the SPHERE_FS halo pass changes — it now ramps the halo up from inner = 1 - 2*vFeather (the body feather start), so body-fade and halo-rise are exact complements and cross-fade into continuous light. Expressed in this page's own vFeather varying so the complement is exact against its crisper ~1.2px body feather, preserving the page's superior frustum-fill/AA tuning (FILL 1.08, rim-bias, 280 cap, DPR budget) untouched. Mirror (grce-design-system) already carried the canvas fix (commit 8d08367).
1 parent 226bcad commit 080d2e4

2 files changed

Lines changed: 37 additions & 3 deletions

File tree

docs/projects/nthpartyfinder/ds/PROVENANCE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,27 @@ catch-up (FILL=0.85, no rim-bias, 220-node cap, no DPR area budget, no
2626
pulse-edge AA). Re-vendoring from the canvas at this point would be a
2727
regression. See the audit ISA above for the full line-by-line comparison.
2828

29+
Halo-under-rim cross-fade AA ported 2026-07-15 (owner reported a dark seam
30+
ring around every sphere on the live page vs the DS canvas): the DS canvas
31+
NodeGraphBackground has since gained a genuine antialiasing improvement this
32+
page lacked — the glow-halo pass used to start exactly at the sphere edge
33+
(discard r<1.0) while the body's rim feather fades to alpha 0 by r=1, leaving
34+
the ~1px feather band lit by NEITHER body nor halo → the dark page shows
35+
through as a 1-2px seam ring (glaring when the halo flares red). Ported the
36+
fix SURGICALLY: only the SPHERE_FS halo pass changed — it now ramps the halo
37+
up from `inner = 1 - 2*vFeather` (the body feather start) so body-fade and
38+
halo-rise are exact complements and cross-fade into continuous light. Expressed
39+
in THIS page's own vFeather varying (not the canvas's vPixelRadius/featherR
40+
scheme) so the complement is exact against this page's crisper ~1.2px body
41+
feather, and so the page's superior frustum-fill/AA tuning documented above is
42+
preserved untouched — the ONLY change is the halo annulus inner edge. The
43+
grce-design-system mirror already carried the canvas fix (synced earlier this
44+
session, commit 8d08367), so no mirror update was needed. Verified: node
45+
--check clean; halo inner edge now r>=inner not r>=1.0. Rendered-pixel
46+
confirmation deferred to the live site — browser automation was unreachable
47+
this background session (and WebGL scenes don't composite into plain
48+
screenshots regardless).
49+
2950
SiteHeader adopted 2026-07-15: the nav (previously a page-local `.np-nav`,
3051
position:sticky bar) is now `ds/site-header.js` — a vanilla auto-mount port
3152
of the DS `SiteHeader.jsx` (grce-design-system re-synced from the Claude

docs/projects/nthpartyfinder/ds/node-graph.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,23 @@ void main(){
187187
gl_FragColor = vec4(col, aa);
188188
} else {
189189
// ---- halo pass (annulus around the body) ----
190-
if (r < 1.0 || r > uGlowMax) discard;
190+
// Ramp the halo up UNDER the body's rim feather — its exact complement — so the
191+
// body fade and halo rise cross-fade into continuous light at the edge. A halo
192+
// that starts at r=1 leaves the body's ~1px feather band (which fades to alpha 0
193+
// by r=1) unlit, showing the dark page through as a seam ring around every sphere
194+
// (glaring when it flares red). Matches the GRCE Design System NodeGraphBackground
195+
// antialiasing fix (halo ramps up under the rim feather).
196+
float f = max(vFeather, 8.0e-4);
197+
float inner = 1.0 - 2.0 * f; // == body feather start ([inner,1])
198+
if (r < inner || r > uGlowMax) discard;
191199
float pulse = 0.5 + 0.5 * sin(uTime * 0.0020944 + vPhase); // per-sphere phase
192-
float halo = 1.0 - smoothstep(1.0, uGlowMax, r); // strong at rim → 0 at edge
193-
halo = pow(halo, 2.2);
200+
float halo;
201+
if (r < 1.0) {
202+
halo = smoothstep(inner, 1.0, r); // rises under the rim feather (complements body fade)
203+
} else {
204+
halo = 1.0 - smoothstep(1.0, uGlowMax, r); // strong at rim → 0 at edge
205+
halo = pow(halo, 2.2);
206+
}
194207
float ch = clamp(vCharge, 0.0, 1.0);
195208
if (uHaloMode < 0.5) {
196209
// dark theme: additive glow; flares RED when an energy pulse arrives

0 commit comments

Comments
 (0)