fix(style): dither the surface tint so it stops banding

"Horizontal scanlines" names it exactly. An alpha ramp from 0x34 to 0 has 52
distinct values, so across a 600px pane each one owns a stripe about 12 pixels
tall, and the eye reads those stripes as scanlines. Raising the contrast only
buys more of them, thinner.

So it dithers. Four ramps at a quarter alpha each, every one ending slightly
lower than the last, so they share a starting colour but run at different
slopes. Their step boundaries land on different rows, and where one layer has
stepped up its neighbours have not, which puts the blend between two quantised
values. Same total tint, four times the effective resolution, three extra draw
calls.

Layers are staggered by slope rather than offset on purpose: shifting them would
leave a gap at the top where fewer layers overlap, which reads as a bright band.
That trades one artefact for a worse one.

The tint is roughly twice as strong now, which the settings pane wanted anyway,
and strength is a parameter so the chat log can stay at 45% of it.
This commit is contained in:
2026-08-18 18:09:46 +02:00
parent c1f1c0563c
commit 05b203c85c
3 changed files with 77 additions and 5 deletions
+1 -1
View File
@@ -389,7 +389,7 @@ internal sealed class MainWindow : Window, IFocusableChatWindow
// a settings pane, which is read in glances; a chat log is read
// line by line, and anything drifting behind the text competes
// with it. What is left is barely a texture.
_backdrop.Draw(accentWashHeight: 0f, moteIntensity: 0.10f);
_backdrop.Draw(accentWashHeight: 0f, moteIntensity: 0.10f, strength: 0.45f);
if (_activeTab is not null)
_messages.Draw(_activeTab);