You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7428257
Browse filesBrowse the repository at this point in the historyBrowse files
feat: depth-of-field — soft-focus + dim the background (#11)
Pushes the background back so the speaker pops: a soft-focus blur + a dim behind the
sharp character. Viewer-local, OFF by default (Settings → "Depth of field").
- go-sdl2 exposes no per-texture scale mode, so a real linear-filtered downscale blur
would need fragile global-hint juggling on the render thread. Instead the bg is
soft-focused by SMEARING: the sharp bg plus eight low-alpha offset ghosts (reusing
the outlineDirs ring, cardinals brighter than diagonals), then a dim overlay. The
shared bg page's alpha is set per ghost and RESTORED to opaque. Replaces only the
background draw — sprites/desk stay sharp. 0-alloc (cached page + scratch rect).
- SpriteFX.DoF flows via SetSpriteFX; config DepthOfField pref + Settings toggle.
Test: a 0-alloc render gate with DoF on. render+config+ui -race green;
BenchmarkRenderFrame still 0 allocs/op. Feature 7 of 10. (A true Gaussian blur is a
follow-up if the smear reads too subtle.)
0 commit comments