Skip to content

shell: texture the launch splash from a pre-rendered sheet - #635

Merged
deblasis merged 1 commit into
windowsfrom
splash-stave
Aug 15, 2026
Merged

shell: texture the launch splash from a pre-rendered sheet#635
deblasis merged 1 commit into
windowsfrom
splash-stave

Conversation

@deblasis

@deblasis deblasis commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Replaces the run-time engraver with one transformed blit. The sheet is drawn
offline and shipped as an asset; the splash picks a crop, a zoom and an angle,
which is about a thousand GDI+ calls fewer on the path whose whole job is to be
on screen before the app is.

Varying the crop rather than the drawing is the better trade anyway. At this
contrast a different piece of the same sheet is indistinguishable from a
differently composed one, and it costs nothing.

Replaceable

A PNG at %APPDATA%\wintty\splash-texture.png is used instead of the shipped
one, in the directory the config and themes already live in. Presence is the
whole signal, so nothing has to work out whether the shipped sheet was
tampered with, and the two being in different places means an upgrade replaces
what it installed and never sees the user's copy.

An ordinary picture has no alpha channel and would come out as one flat slab of
ink, since the shipped sheet is a mask and alpha is what says how far towards
the ink a pixel goes. For those, brightness says it instead. Decided from the
pixel format rather than by reading pixels, because this runs before the app is
on screen.

Tested

LaunchTexture and LaunchTextureSource are pure, so the things that fail
invisibly get tested. A crop that runs off the sheet draws a hard edge across
the splash. A turned image smaller than its window leaves a bare corner at some
angles and window shapes but not others. A resolution order that came out
backwards would ignore a customisation silently, which looks like the feature
simply not working.

Two of the tests exist because the splash looked static in use and neither the
code nor the other tests explained why:

The seed is a clock, and a seeded Random turns a steadily moving seed into a
steadily moving first draw -- its first value is very nearly linear in its seed.
The angle came out as a slow sawtooth, about four degrees between launches a
couple of seconds apart, which reads as no rotation at all. The seed is now
avalanched before anything is drawn from it.

The turn range is wide enough to look like a different angle each time, but
strictly inside a half turn either way so the content is never inverted, and
short of vertical at both ends so it never stops reading as what it is.

Alpha

The sheet is a white-on-nothing mask tinted at draw time. The colour matrix maps
it straight onto the background and the ink rather than blending over the
background, and pins alpha to 1: UpdateLayeredWindow is called with an opaque
source, so nothing here may depend on GDI+ blending having preserved it. Checked
offscreen on light and dark backgrounds, minimum alpha 255.

@deblasis deblasis changed the title shell: draw a faint stave behind the launch icon shell: texture the launch splash with a page of music Aug 14, 2026
@deblasis
deblasis force-pushed the splash-stave branch 4 times, most recently from 8bd8ef8 to d1ef189 Compare August 15, 2026 06:32
@deblasis deblasis changed the title shell: texture the launch splash with a page of music shell: texture the launch splash from a pre-rendered sheet Aug 15, 2026
@deblasis
deblasis force-pushed the splash-stave branch 8 times, most recently from 86a4942 to af69b30 Compare August 15, 2026 16:04
Replaces the run-time engraver with one transformed blit. The sheet is
drawn offline and shipped as an asset; all the splash does is pick a crop,
a zoom and an angle, which is roughly a thousand GDI+ calls fewer on the
path whose whole job is to be on screen before the app is.

Varying the crop rather than the drawing turns out to be the better trade
anyway: at this contrast a different piece of the same sheet is
indistinguishable from a differently composed one, and it costs nothing.

The texture is replaceable. A PNG at %APPDATA%\wintty\splash-texture.png
is used instead of the shipped one, in the directory the config and themes
already live in. Presence is the whole signal, so nothing has to work out
whether the shipped sheet was tampered with, and the two being in different
places means an upgrade replaces what it installed and never sees the
user's copy.

An ordinary picture has no alpha channel and would come out as one flat
slab of ink, since the shipped sheet is a mask and alpha is what says how
far towards the ink a pixel goes. For those, brightness says it instead.
Decided from the pixel format rather than by reading pixels: this runs
before the app is on screen.

LaunchTexture and LaunchTextureSource are pure, so the things that fail
invisibly are tested. A crop that runs off the sheet draws a hard edge
across the splash. A turned image smaller than its window leaves a bare
corner at some angles and window shapes but not others. A resolution order
that came out backwards would ignore a customisation silently, which looks
like the feature simply not working.

Two more tests exist because the splash looked static in use and neither
the code nor the other tests explained why:

The seed is a clock, and a seeded Random turns a steadily moving seed into
a steadily moving first draw -- its first value is very nearly linear in
its seed. The angle came out as a slow sawtooth, about four degrees between
launches a couple of seconds apart, which reads as no rotation at all. The
seed is now avalanched before anything is drawn from it.

The turn range is wide enough to look like a different angle each time but
stays strictly inside a half turn either way, so the content is never
inverted, and short of vertical at both ends, so it never stops reading as
what it is.

The sheet is a white-on-nothing mask tinted at draw time. The colour matrix
maps it straight onto background and ink rather than blending over the
background, and pins alpha to 1: UpdateLayeredWindow is called with an
opaque source, so nothing here is allowed to depend on GDI+ blending having
preserved it. Verified opaque on light and dark backgrounds.
@deblasis
deblasis merged commit d5b4f32 into windows Aug 15, 2026
97 checks passed
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