fix(ui): keep untinted images at HDR paper white #3179
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3179
Loading…
Reference in a new issue
No description provided.
Delete branch "futondestroyer/Longshot:codex/hero-logo-colour"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
On a Native HDR display, launch Longshot through the in-game pipeline-loading screen and then open the Insert menu. The striped logo looks dark in both places while the nearby title remains bright.
The Vulkan painter had already converted the texture to HDR paper white. It also converted the neutral white tint before multiplying the two. Keep neutral white at full scale when the draw samples an HDR colour texture, including the RGB of faded edges. The render path and the regression are in
gpu/vk/vk_paint.cppandtests/test_paint_image_colour.py.Testing
Tested
b9484359reproduces the HDR failure with a white tint offf7c7c7cat 80 nits.a263dbadpasses both SDR target formats and HDR at 80, 200 and 400 nits. The fixture also checks image fades, explicit colour tints and text coverage.d6e819e0anda263dbadwith Native HDR at 200 nits. The logo was visibly brighter on both the pipeline-loading screen and the Insert header. The nearby title looked unchanged. The exact Insert runs used the same disposable Kokiri save and both exited normally. The paired SDR Insert screenshots have identical pixels across the logo and title.Still to test
Measurements
Verdict: The logo is brighter on both HDR surfaces. Its SDR output matches the control.
Setup: The fixture isolates the white tint applied by the Vulkan painter at 200 nits. The native HDR comparison above verifies the visible result on the same PC and save.
d6e819e0a263dbadRisks
The change normalizes tint colours on colour textures in HDR overlays relative to paper white. Glyph coverage continues through the existing colour path. It requires no settings, save or cache migration. Reverting the patch restores the former output.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.mainand here, for a change that shows on screen.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Tested in game: Windows 11, RTX 4070, NVIDIA 621.01. Compared exact
d6e819e0anda263dbadon the Native HDR pipeline-loading screen and the Insert header at the same disposable Kokiri save. The candidate restored the logo brightness on both screens, and the SDR Insert logo and title matched pixel for pixel.Possibly related, for context:
Native HDR before and after
Exact control
d6e819e0and fixa263dbadon Windows 11, GeForce RTX 4070, driver 621.01, with paper white at 200 nits. The Insert captures use the same disposable Kokiri save. Each screenshot contains only the Longshot client.Startup
Insert
@review
Recommendation: Approve. The fix brightens the reported logos, but it introduces a large brightness jump between white and nearly white image tints in HDR. The tint conversion needs to remain continuous before this merges. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
The change keeps a white tint neutral when drawing HDR colour textures, restoring the reported logos while preserving their alpha. It adds command vertex offsets and a game-free regression test, but leaves nearly white tints on the old, much darker path.
Should fix (1): not blocking, but worth doing before merging.
gpu/vk/vk_paint.cpp:1100: The exact-white exception makes HDR image tint brightness discontinuous at white. (more on the line) Do: Convert colour-texture tints as multiplicative factors consistently for all tint colours, with white mapping to one, and add a regression covering near-white and coloured tints.Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_paint.cpp:1095: The HDR rendering change still needs coverage on the supported Linux HDR path and affected Tier 1 hardware. (more on the line) Do: Run the startup and Insert logo comparison on Linux HDR, including an affected AMD Tier 1 configuration, and check image tints and text against the base.@fixcan do L1.Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes for the reported Windows case: the author compared the base and head on an RTX 4070 at 200 nits and observed brighter startup and Insert logos, with identical SDR pixels in the compared Insert region. The fixture reports a neutral HDR tint multiplier changing from 148/255 to 255/255 at 200 nits.
Other systems: The painter also draws mod images, glyph pages, menu overlays and offscreen world labels. Alpha textures and the offscreen list retain their existing conversion paths; SDR output is unchanged by the new condition. Linux HDR and other Tier 1 hardware remain untested.
Switches: None.
Reviewed:
a263dbadb8againstd6e819e084: Read AGENTS.md, CONTRIBUTING.md, docs/dev/standards.md, the pull request template, all three changed files, the diff and commits, and the relevant painter shader and UI callers. Skimmed surrounding UI paths and test-runner compiler selection. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. Screenshot attachments and CI logs were not available in the checkout.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no tests or project code were run. The author reports the new test passing and a Windows strict suite with 72 failures that still need comparison with main. Head CI is still running.
Overlaps and merge order: Not checked; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -1095,0 +1092,4 @@for (int i = 0; i < list.CmdBuffer.Size; i++) {const Cmd& c = list.CmdBuffer[i];const int end = i + 1 < list.CmdBuffer.Size ? list.CmdBuffer[i + 1].VtxOffset : list.VtxBuffer.Size;const bool hdr_image = colours.hdr && c.tex && c.tex->format == Format::kRgba8;L2 (should fix): The HDR rendering change still needs coverage on the supported Linux HDR path and affected Tier 1 hardware.
When: Only Windows NVIDIA results are recorded; the change also runs for HDR overlays on Linux and AMD systems.
Do: Run the startup and Insert logo comparison on Linux HDR, including an affected AMD Tier 1 configuration, and check image tints and text against the base.
@ -1095,0 +1097,4 @@vout[v] = list.VtxBuffer[v];// HDR colour textures already carry paper white. Keep a white tint multiplicatively neutral, including// on faded images and their antialiased edges. Coverage textures still get their RGB from the vertex.if (!hdr_image || (vout[v].col & ~kAlphaMask) != ~kAlphaMask)L1 (should fix): The exact-white exception makes HDR image tint brightness discontinuous at white.
When: An image quad with RGB tint 255,255,255 gets a 255/255 multiplier, but changing one channel to 254 sends the whole tint through hdr10_of; at 200 nits its near-white channels become about 148/255. An animated or hover tint passing between these values therefore makes the image abruptly darken even though its requested colour barely changed.
Do: Convert colour-texture tints as multiplicative factors consistently for all tint colours, with white mapping to one, and add a regression covering near-white and coloured tints.
@fix
a263dbadb8ddbc76d2bdRecommendation: Approve. The code is ready: only testing is left. The Windows comparison shows the HDR logo brightness fix working, but Linux HDR and affected Tier 1 hardware coverage remain outstanding. Recommend approval; not approved on the forge.
What
@fixchangedI changed this pull request: the new head is
ddbc76d2bd. I rebased it ontomain(e57f7793fd). I edited its description to match the change.Changed
Nothing was built or run: the checks run again on the new head.
The painter keeps neutral image tints at full scale over HDR colour textures and normalizes other tints relative to paper white. The fix preserves the intended brightness change while adding per-vertex colour conversion work.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_paint.cpp:1095: The HDR rendering change still needs coverage on the supported Linux HDR path and affected Tier 1 hardware. When: Only Windows NVIDIA results are recorded; the change also runs for HDR overlays on Linux and AMD systems. Do: Run the startup and Insert logo comparison on Linux HDR, including an affected AMD Tier 1 configuration, and check image tints and text against the base.Checks: they run again on this head; a failure shows on the pull request.
Also noticed (5; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Yes for the reported Windows case: the author reports brighter startup and Insert logos at 200 nits, with pixel-identical SDR logo and title output. The reported fixture results predate the final tint-normalization fix.
Other systems: The change affects HDR colour textures in Vulkan overlays, including coloured tints and colour-vision correction. Linux HDR and affected Tier 1 hardware have not been reported tested; SDR and glyph coverage retain their existing paths.
Switches: None added, changed or removed by the painter fix.
Reviewed:
ddbc76d2bdagainste57f7793fd: Read the fix diff, the complete new painter test, the changed painter functions and their colour conversion and upload context, AGENTS.md, CONTRIBUTING.md and the pull request template. Skimmed the base diff and commit list; the base diff contains many additional files that were not read in full. The review checklist and sibling Tooling rules were unavailable.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run project code were executed. The author reports Windows game comparisons and fixture results for the earlier head; Linux HDR and Tier 1 coverage remain outstanding.
Overlaps and merge order: Not determined; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
WIP: fix(ui): keep untinted images at HDR paper whiteto fix(ui): keep untinted images at HDR paper white