Skip to content

Crt glow fix - #59

Merged
digarok merged 2 commits into
mainfrom
crt-glow-fix
Jul 19, 2026
Merged

Crt glow fix#59
digarok merged 2 commits into
mainfrom
crt-glow-fix

Conversation

@digarok

@digarok digarok commented Jul 19, 2026

Copy link
Copy Markdown
Owner

adds slider for crt glow at much lower defaults and fixes some blending.

digarok and others added 2 commits July 19, 2026 15:58
The CRT bloom rendered at full strength instead of the intended
CRT_GLOW_LEVEL (90/255): SDL_RenderGeometry ignores
SDL_SetTextureColorMod (only SDL_RenderTexture applies it), so the glow
pass added the blurred picture at ~3x the tuned amount, washing out
bright scenes. The strength now lives where RenderGeometry actually
looks -- a second vertex array (glow_verts) with it baked into the
vertex colors.

The bloom also switched itself on and off with window size: it used
SDL_BLENDMODE_ADD, which scales the source by its alpha, and the
framebuffer's alpha depends on which video_out_data copy path ran (the
scaled paths OR in g_alpha_mask; the 1:1 path didn't). Together the two
bugs made the glow look intermittent. The glow now uses a custom ADD
blend that ignores source alpha, and the 1:1 path applies g_alpha_mask
like the scaled ones (core fix, upstream candidate).

With the strength finally honored, make it tunable: a "CRT Glow 0-100"
entry in the Display Effects menu (config var "crtglow", default 20,
live-applied; 100 = the old full strength). Glow 0 skips the bloom
passes entirely.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012YhTRt358eMKiNLiDXVDAB
@digarok
digarok merged commit 960096a into main Jul 19, 2026
6 checks passed
@digarok
digarok deleted the crt-glow-fix branch July 19, 2026 21:17
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