Crt glow fix - #59
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
adds slider for crt glow at much lower defaults and fixes some blending.