Skip to content

Add the bloom to the golden_line example - #351

Merged
ASDAlexander77 merged 1 commit into
mainfrom
golden-line-bloom
Dec 5, 2026
Merged

ASDAlexander77 merged 1 commit into
mainfrom
golden-line-bloom

Conversation

@ASDAlexander77

Copy link
Copy Markdown
Owner

Ports golden-line's bloom (render/pipeline.js, MIT), which is three.js r187's BloomNode (MIT) with a capped high pass.

  • core/golden_line_bloom.ts: half-size bright target and five RGBA16F levels (sizes as BloomNode's setSize), the gaussian kernels built as BloomNode builds them (bilinear tap pairs), passes driven by 128-byte push constants; setGlare(open, dazzle) as pipeline.js.
  • shaders/golden_line_bloom.hlsl: high pass (luminance threshold + smooth width, per-pixel cap), separable blur, composite with lerpBloomFactor.
  • Tone mapping adds the glow (bilinear, half size) to the HDR image before the exposure, as color.add(glow) ahead of three's output tone mapping.
  • The example sets the glare from the eye's adaptation (open; 0 in the window seat). The shots' own dazzle comes with the camera shots, not ported yet.

Verification

  • On/off pairs taken within one prepared page shot vs ours at the same clock: the glow around the sun is pixel-identical at every sampled radius; with the eye open at a tunnel mouth the glare energy agrees within 2%; deep in a bore neither shows glow. Remaining energy differences in sunlit views follow scene differences (foliage, water, boiler highlight), not the glow.
  • gc, own and rc renders byte-identical; own builds without fallback.
  • Vulkan -debug clean, no glow offset vs DX12.
  • ctest -R golden_line: 6/6 passed.

🤖 Generated with Claude Code

Ports golden-line's render/pipeline.js glow, three.js r187's BloomNode:
a half-size high pass above a linear threshold with each pixel's share
capped, five levels blurred by a separable gaussian (bilinear taps, push
constants), summed with the radius weighting into a half-size glow that
the tone mapping adds before the exposure. setGlare follows the eye open
in a bore (lower threshold, wider and stronger glow, capped pixels); the
shots' own dazzle isn't ported.

Checked against the page with on/off pairs taken in one prepared shot:
the glow around the sun is pixel-identical and the tunnel-mouth glare
agrees within 2%. gc, own and rc render byte-identical; Vulkan -debug is
clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ASDAlexander77
ASDAlexander77 merged commit eec9a19 into main Dec 5, 2026
2 checks passed
@ASDAlexander77
ASDAlexander77 deleted the golden-line-bloom branch December 5, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant