From c9a4e6eeaea953d84fd415620f15ad166c6bb32a Mon Sep 17 00:00:00 2001 From: rolandnsharp Date: Sun, 5 Apr 2026 20:21:09 +1000 Subject: [PATCH] =?UTF-8?q?Thinner=20traces=20=E2=80=94=20horizontal-only?= =?UTF-8?q?=20bloom,=20no=20vertical=20bleed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- src/osc/phosphor.nim | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/src/osc/phosphor.nim b/src/osc/phosphor.nim index d2c8b0e..c524203 100644 --- a/src/osc/phosphor.nim +++ b/src/osc/phosphor.nim @@ -5,9 +5,8 @@ import illwill, math const PhosphorDecay* = 0.60 # per-frame persistence (P31 green phosphor) - BeamIntensity* = 0.9 # brightness at beam impact - BloomInner* = 0.25 # glow spread to adjacent pixels - BloomOuter* = 0.08 # faint halo from electron scatter + BeamIntensity* = 0.7 # brightness at beam impact + BloomH* = 0.15 # horizontal glow spread MinBright* = 0.02 # below this, phosphor is considered off type @@ -45,20 +44,10 @@ proc plotDot*(pb: var PhosphorBuffer, fx, fy: float) = let y = int(fy) if x < 0 or x >= pb.w or y < 0 or y >= pb.pixH: return - # Beam impact + # Beam impact — no vertical bloom, keeps traces thin pb.add(x, y, BeamIntensity) - # Inner bloom — phosphor scatter - pb.add(x, y - 1, BloomInner) - pb.add(x, y + 1, BloomInner) - pb.add(x - 1, y, BloomInner * 0.5) - pb.add(x + 1, y, BloomInner * 0.5) - # Outer bloom — electron scatter - pb.add(x, y - 2, BloomOuter) - pb.add(x, y + 2, BloomOuter) - pb.add(x - 1, y - 1, BloomOuter) - pb.add(x + 1, y - 1, BloomOuter) - pb.add(x - 1, y + 1, BloomOuter) - pb.add(x + 1, y + 1, BloomOuter) + pb.add(x - 1, y, BloomH) + pb.add(x + 1, y, BloomH) proc plotLine*(pb: var PhosphorBuffer, x0, y0, x1, y1: float) = ## Interpolated line of phosphor dots between two points.