feat(vk): Sharpness is AMD's RCAS on the 3D scene, before the HUD, by depth and in HDR #3118

Merged
HumanBean merged 9 commits from llun/Longshot:feat/sharpen-scene-rcas into main 2026-12-04 02:19:32 +00:00
Member

Summary

The Sharpness slider now sharpens the 3D scene, and only that. Before, it ran on the finished picture, so it also sharpened the HUD, menus and movies, and a limit in it kept every pixel between its darkest and brightest neighbor, so thin lines and fine texture came out unchanged.

  • The filter is AMD's RCAS (FidelityFX FSR 1, MIT), with its noise limit, right after whichever upscaler drew the picture: before mods' effects, ReShade, the HUD and frame generation. The old sharpen in the window pass is gone. FSR's own sharpening stays off, so nothing is sharpened twice.
  • By depth: the sky gets none, what is far gets less (from 30 m to 200 m), and so does an outline against something far behind it. RX_VK_SHARPEN_DEPTH=0 turns that off.
  • HDR: under the paper white it works as in SDR; above it, nothing gets brighter than the brightest light beside it. With PsychoV35 and the game's own upscaler too.
  • The menu says where to start for each upscaler, in place of "around 80%": 30% (the game's own; DLSS's Transformer 2 models), 40% (DLSS, DLAA, FSR 4, XeSS), 50% (FSR 3.1; DLSS at 50% Render resolution or less). Sources are thin: the 30% for the game's own is a judgment.

Same row, same key, same default (0%). Menus and movies are no longer sharpened.

Read first: gpu/vk/shaders/sharpen.comp, gpu/vk/vk_sharpen.cpp, and finish_upscale_picture in gpu/vk/vk_draw.cpp.

Credit and prior work. ghost_nup found that the old limit blocked the sharpening, in pull request 2940, which is open on the same feature. That one removes the limit but stays after the HUD for most upscalers and uses three methods; this one sharpens before the HUD, by depth, one way for every upscaler. No code is taken from it. The HDR range follows OptiScaler's RCAS (the idea, not its code). RCAS is AMD's. See issue 2569.

Testing

Tested: Windows 11, RTX 5080, driver 621.47, 1920x1080, in the game.

  • SDR, DLAA: the Market, Link's house, the Shadow Temple, the Bottom of the Well and Dodongo's Cavern, at 0 to 100%. The HUD is untouched and shadows are not crushed. Run on eeaf24c22, an early build.
  • Native HDR, DLAA: Vanilla and PsychoV35 in the Market; PsychoV35 also in the Shadow Temple, Dodongo's Cavern and Hyrule Field. Nothing passes 1000 nits. Run on eeaf24c22; PsychoV35 in the Market again with caee78a54's code, before the last rebase: the same.
  • PsychoV35 with the game's own upscaler: the Market (100% and 67% Render resolution), the Shadow Temple and Dodongo's Cavern, at 0, 40 and 100%, on caee78a54's code before the last rebase. It is sharpened, by the scene's depth, with no errors in the log. The game's network writes light below zero at edges; a first version cut it to 0, which made 1.6% of the Market's picture black at 40%. It is none now, at 0, 40 and 100%.
  • The other upscalers and HDR modes (caee78a54, the Market, 0, 40 and 100%): SDR with DLSS at 50%; Vanilla and Expanded with DLAA and the game's own; PsychoV35 with the game's own, DLSS (67% and 50%), FSR 3.1 (67%), Off, XeSS (67%) and XeSS Native AA. All are sharpened by the scene's depth, with no errors in the log. No black pixels are added, and the minimap is as at 0% (at most 7% more fine detail at 100%, where the scene shows through it). In Native HDR the brightest light stays where it was. Expanded's own HDR output was not measured: the test's shots hold the SDR picture before it is expanded.
  • Flicker in a real camera turn (about 5 to 8 pixels a frame, two turns each): the table under Measurements. At 40%, from about the same to 21% more than at 0%. At 100%, 26 to 84% more.
  • By hand: SDR with DLAA, no flicker noticed (an earlier build). PsychoV35 with the game's own upscaler on an HDR screen at 40% (caee78a54): looks good. PsychoV35 with DLAA on an HDR screen at 100% (caee78a54): acceptable.
  • Now, on 78fc956f0 (main 7375aa551), sandbox off as main has it: the Market in SDR with DLAA and in PsychoV35 with the game's own upscaler, at 0, 40 and 100%. It sharpens by the scene's depth, with no errors in the log. No black pixels are added in PsychoV35; in SDR, 3 pixels of about 2 million go from almost black to black at 100%. At 40% a turn flickers 28% more than at 0% in SDR, 7% more in PsychoV35. The runs on caee78a54 and before had the sandbox on.
  • Snapdragon GSR 2 (new on main), on 4cbec96ab: the Market at 67%, SDR and PsychoV35. It is sharpened. At 40% a turn flickers 29% and 33% more than at 0%. GSR 2's picture has a fine dot pattern with Sharpness off, and Sharpness strengthens it, so the menu recommends no number for it.
  • A cold review of the branch by a second agent, before the PsychoV35 part, found eleven points: fixed, or under Risks.

mise run test on 1d923a7fb (main 7c3c16f0a, Windows, gnullvm): 826 passed, 18 failed, 51 skipped. None of the 18 is this pull request's:

  • Eight fail on clean main 7c3c16f0a too: test_cursor_hidden_linux, test_input_background, test_dlssg_folders, test_state_list_give_back, test_linux_pressure, test_loaded_modules_drop, test_program_cache_one_variant, test_program_cache_cleanup.
  • Eight fail only in the full run, with other jobs running, and pass one at a time: test_stack_commit, test_direct_buffer_writes, test_display_startup_failure, test_fallback_buffer_cleanup, test_frame_wait_bounds, test_invalidate_vcore, test_mesh_args_cleanup, test_pipeline_cache_save.
  • test_fsr_uniform_ownership fails to compile (prepared_dynamic), the same on clean main 7c3c16f0a.
  • test_lifter stops at clippy, at an unused import in build-core, which this does not touch. Its Rust tests were run for the crates this could affect: api 558 pass and 1 fails, modtool 247 pass and 1 fails. The two that fail (a_walked_reshade_folder_counts_a_change_once_two_walks_agree, the_menu_passes_its_tests) fail on clean main 7c3c16f0a too. The rest of the workspace's clippy and Rust tests were not run.

After that came one rebase, onto 7375aa551. Rerun on 78fc956f0, what it could affect: 16 checks (Sharpness, the menu's texts and keys, the renderer's wiring) pass, api 559 pass with the same one failing, and the two game runs above. The full suite was not rerun.

On Linux the changed C++ files in gpu/vk/ compile on 78fc956f0 (Ubuntu 24.04 in WSL, g++ 13 and clang 18, the renderer's flags, no link). The whole build was not made there, and it has not run there.

Still to test:

  • AMD, Intel and Steam Deck (Windows and Linux): Sharpness 0, 40 and 100% with each upscaler, expecting it to work, the log's vk: sharpness: line to say "by the scene's depth", and no errors (@Beanstalk Sharpness at 0, 40 and 100% with FSR 3.1, the game's own and Off)
  • Any AMD, Intel or Deck at Render resolution 50% and 67% with the game's own upscaler: the same, expecting the depth to be there (its networks are left out on those cards) (@Beanstalk Sharpness 40% at 50% Render resolution)
  • Steam Deck or another integrated GPU: frame time at Sharpness 0 against 40% (by hand)
  • DLSS Performance: leaves and roofs against the sky while turning, expecting no visible flicker at 40% (by hand; measured above)
  • HDR by eye on an HDR screen: Vanilla, Expanded, and PsychoV35 with another upscaler than the game's own (by hand; measured above)

Measurements

Verdict: It leaves the HUD alone and the sky nearly so, and sharpens near detail more than main. At 40%, house walls come out about as on main: the gain there is small. Frame rates overlap at 0%; at 40% the two averages differ by about 1.5%, about the size of the spread between runs. The pass costs about 0.055 ms of GPU a frame at 1920x1080 on an RTX 5080 (not a timing run).

Setup: Windows 11, RTX 5080, driver 621.47, DLAA at 1920x1080, the Market (child). Frame rates: dev.py ab's timing queue, 2 runs of 45 s a side, interleaved, warmed up, the same game folder with only longshot_vk.dll different. The machine is CPU-bound in the Market (about 122 fps). The tool wrote no summary (Windows handle numbers in the switches differ run to run); the numbers are its own lines, below. The "after" frame rates are the build before the rebases; they bring no change to what is measured. The fine detail and flicker rows are from an earlier build with the same shader (2 rounds, standing still and a steady turn). The baseline is main's longshot_vk.dll at 0aeb68589.

Before: main @ 0aeb68589 After: this PR @ eeaf24c22
Market, 40%: fps, two runs 122.5, 123.8 119.9, 122.6
Market, 40%: 1% low fps 98.6, 100.2 89.7, 98.4
Market, 0%: fps, two runs 125.2, 120.3 122.4, 126.0
Market, 0%: 1% low fps 100.5, 86.4 97.1, 99.8
Minimap, fine detail at 40% / 100% (1.00 = as at 0%) 1.08 / 1.20 1.00 / 1.00
Distant castle, 40% / 100% 1.20 / 1.79 0.98 / 1.14
Near paving, 40% / 100% 1.10 / 1.56 1.26 / 2.33
House wall, 40% / 100% 1.22 / 1.66 1.23 / 2.21
Flicker while turning, 0% / 40% / 100% (lower is steadier) 2.6 / 2.9 / 3.5 2.4 / 2.6 / 4.1

RX_VK_SHARPEN_DEPTH ships on: at 100% the sky's fine detail is ×0.98 of 0% with it and ×2.11 without, and the distant castle ×1.18 against ×2.25, for about 0.01 ms (a rough number).

At 100% the new one is stronger and flickers more than the old one, which is why the menu starts lower.

Flicker in a camera turn on caee78a54 (average of two turns; lower is steadier; compare along a row only):

0% 40% 100%
SDR, DLSS 50% 2.4 2.9 (+19%; at 50%: +18%) 4.1 (+71%)
Vanilla, DLAA 1.5 1.6 (+11%) 2.4 (+66%)
Vanilla, the game's own 6.9 (one turn) 6.6 (-4%) 8.7 (+26%)
Expanded, DLAA 3.4 3.8 (+11%) 5.5 (+63%)
Expanded, the game's own 11.7 12.5 (+7%) 15.0 (+28%)
PsychoV35, the game's own 6.0 6.4 (+7%) 8.1 (+36%)
PsychoV35, DLSS 67% 1.5 1.8 (+21%) 2.8 (+84%)
PsychoV35, DLSS 50% 1.5 1.8 (+20%) 2.4 (+58%)
PsychoV35, FSR 3.1 67% 1.3 1.4 (+9%) 2.1 (+59%)
PsychoV35, Off 2.7 2.9 (+7%) 4.1 (+53%)
PsychoV35, XeSS 67% 1.2 1.2 (-3%) 1.8 (+48%)
PsychoV35, XeSS Native AA 1.2 1.5 (+19%) 1.7 (+39%)
A1: 5513 frames in 45 s, 122.5 fps, median 8.03 ms, p99 10.14 ms, 1% low 98.6 fps
B1: 5397 frames in 45 s, 119.9 fps, median 8.15 ms, p99 11.15 ms, 1% low 89.7 fps
A2: 5571 frames in 45 s, 123.8 fps, median 7.93 ms, p99 9.98 ms, 1% low 100.2 fps
B2: 5516 frames in 45 s, 122.6 fps, median 8.03 ms, p99 10.16 ms, 1% low 98.4 fps
vk:   m   0.055 ms     1.0 x     55.0 us       1.0 items    0.00 MB  m sharpen
vk: sharpness: 40% on the 3D scene before the HUD, 1920x1080, B10G11R11, by the scene's depth (sky at 25041 m)

Risks

  • Weak GPUs: a full-size copy, one pass and five depth reads a pixel, not measured on one.
  • CPU: with the game's own upscaler, the scene's camera is now read for each scene-sized draw while Sharpness is above 0, as it already is with DLSS, FSR and XeSS. The cost is not measured alone.
  • A card that cannot write the game's usual picture format (B10G11R11) is not sharpened there and says why in the log; PsychoV35's (RGBA16F) still is. Run only on stand-in devices in tests/test_sharpen.py.
  • PsychoV35 with the game's own upscaler: the picture is found for Sharpness alone, so mods' effects, ReShade and frame generation get what they did.
  • What a player notices: the HUD, menus and movies are no longer sharpened, 100% is stronger, and presets keep their old numbers (30 to 50%). Saves, settings.toml and caches: nothing.
  • Off: Sharpness 0 runs none of it. A revert is enough.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Screenshots of the same spot on main and here, for a change that shows on screen.
  • The SPIR-V headers regenerated (a shader changed).
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary The Sharpness slider now sharpens the 3D scene, and only that. Before, it ran on the finished picture, so it also sharpened the HUD, menus and movies, and a limit in it kept every pixel between its darkest and brightest neighbor, so thin lines and fine texture came out unchanged. - **The filter is AMD's RCAS** (FidelityFX FSR 1, MIT), with its noise limit, right after whichever upscaler drew the picture: before mods' effects, ReShade, the HUD and frame generation. The old sharpen in the window pass is gone. FSR's own sharpening stays off, so nothing is sharpened twice. - **By depth:** the sky gets none, what is far gets less (from 30 m to 200 m), and so does an outline against something far behind it. `RX_VK_SHARPEN_DEPTH=0` turns that off. - **HDR:** under the paper white it works as in SDR; above it, nothing gets brighter than the brightest light beside it. With PsychoV35 and the game's own upscaler too. - **The menu says where to start** for each upscaler, in place of "around 80%": 30% (the game's own; DLSS's Transformer 2 models), 40% (DLSS, DLAA, FSR 4, XeSS), 50% (FSR 3.1; DLSS at 50% Render resolution or less). Sources are thin: the 30% for the game's own is a judgment. Same row, same key, same default (0%). Menus and movies are no longer sharpened. Read first: `gpu/vk/shaders/sharpen.comp`, `gpu/vk/vk_sharpen.cpp`, and `finish_upscale_picture` in `gpu/vk/vk_draw.cpp`. **Credit and prior work.** ghost_nup found that the old limit blocked the sharpening, in [pull request 2940](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2940), which is open on the same feature. That one removes the limit but stays after the HUD for most upscalers and uses three methods; this one sharpens before the HUD, by depth, one way for every upscaler. No code is taken from it. The HDR range follows [OptiScaler](https://github.com/optiscaler/OptiScaler)'s RCAS (the idea, not its code). RCAS is AMD's. See [issue 2569](https://git.magicbean.dev/MagicBeanDev/Longshot/issues/2569). ## Testing **Tested:** Windows 11, RTX 5080, driver 621.47, 1920x1080, in the game. - **SDR, DLAA:** the Market, Link's house, the Shadow Temple, the Bottom of the Well and Dodongo's Cavern, at 0 to 100%. The HUD is untouched and shadows are not crushed. Run on eeaf24c22, an early build. - **Native HDR, DLAA:** Vanilla and PsychoV35 in the Market; PsychoV35 also in the Shadow Temple, Dodongo's Cavern and Hyrule Field. Nothing passes 1000 nits. Run on eeaf24c22; PsychoV35 in the Market again with caee78a54's code, before the last rebase: the same. - **PsychoV35 with the game's own upscaler:** the Market (100% and 67% Render resolution), the Shadow Temple and Dodongo's Cavern, at 0, 40 and 100%, on caee78a54's code before the last rebase. It is sharpened, by the scene's depth, with no errors in the log. The game's network writes light below zero at edges; a first version cut it to 0, which made 1.6% of the Market's picture black at 40%. It is none now, at 0, 40 and 100%. - **The other upscalers and HDR modes (caee78a54, the Market, 0, 40 and 100%):** SDR with DLSS at 50%; Vanilla and Expanded with DLAA and the game's own; PsychoV35 with the game's own, DLSS (67% and 50%), FSR 3.1 (67%), Off, XeSS (67%) and XeSS Native AA. All are sharpened by the scene's depth, with no errors in the log. No black pixels are added, and the minimap is as at 0% (at most 7% more fine detail at 100%, where the scene shows through it). In Native HDR the brightest light stays where it was. Expanded's own HDR output was not measured: the test's shots hold the SDR picture before it is expanded. - **Flicker in a real camera turn (about 5 to 8 pixels a frame, two turns each):** the table under Measurements. At 40%, from about the same to 21% more than at 0%. At 100%, 26 to 84% more. - **By hand:** SDR with DLAA, no flicker noticed (an earlier build). PsychoV35 with the game's own upscaler on an HDR screen at 40% (caee78a54): looks good. PsychoV35 with DLAA on an HDR screen at 100% (caee78a54): acceptable. - **Now, on 78fc956f0 (main 7375aa551), sandbox off as main has it:** the Market in SDR with DLAA and in PsychoV35 with the game's own upscaler, at 0, 40 and 100%. It sharpens by the scene's depth, with no errors in the log. No black pixels are added in PsychoV35; in SDR, 3 pixels of about 2 million go from almost black to black at 100%. At 40% a turn flickers 28% more than at 0% in SDR, 7% more in PsychoV35. The runs on caee78a54 and before had the sandbox on. - **Snapdragon GSR 2 (new on main), on 4cbec96ab:** the Market at 67%, SDR and PsychoV35. It is sharpened. At 40% a turn flickers 29% and 33% more than at 0%. GSR 2's picture has a fine dot pattern with Sharpness off, and Sharpness strengthens it, so the menu recommends no number for it. - A cold review of the branch by a second agent, before the PsychoV35 part, found eleven points: fixed, or under Risks. `mise run test` on 1d923a7fb (main 7c3c16f0a, Windows, gnullvm): 826 passed, 18 failed, 51 skipped. None of the 18 is this pull request's: - Eight fail on clean main 7c3c16f0a too: `test_cursor_hidden_linux`, `test_input_background`, `test_dlssg_folders`, `test_state_list_give_back`, `test_linux_pressure`, `test_loaded_modules_drop`, `test_program_cache_one_variant`, `test_program_cache_cleanup`. - Eight fail only in the full run, with other jobs running, and pass one at a time: `test_stack_commit`, `test_direct_buffer_writes`, `test_display_startup_failure`, `test_fallback_buffer_cleanup`, `test_frame_wait_bounds`, `test_invalidate_vcore`, `test_mesh_args_cleanup`, `test_pipeline_cache_save`. - `test_fsr_uniform_ownership` fails to compile (`prepared_dynamic`), the same on clean main 7c3c16f0a. - `test_lifter` stops at clippy, at an unused import in `build-core`, which this does not touch. Its Rust tests were run for the crates this could affect: `api` 558 pass and 1 fails, `modtool` 247 pass and 1 fails. The two that fail (`a_walked_reshade_folder_counts_a_change_once_two_walks_agree`, `the_menu_passes_its_tests`) fail on clean main 7c3c16f0a too. The rest of the workspace's clippy and Rust tests were not run. After that came one rebase, onto 7375aa551. Rerun on 78fc956f0, what it could affect: 16 checks (Sharpness, the menu's texts and keys, the renderer's wiring) pass, `api` 559 pass with the same one failing, and the two game runs above. The full suite was not rerun. On Linux the changed C++ files in `gpu/vk/` compile on 78fc956f0 (Ubuntu 24.04 in WSL, g++ 13 and clang 18, the renderer's flags, no link). The whole build was not made there, and it has not run there. **Still to test:** - AMD, Intel and Steam Deck (Windows and Linux): Sharpness 0, 40 and 100% with each upscaler, expecting it to work, the log's `vk: sharpness:` line to say "by the scene's depth", and no errors (@Beanstalk Sharpness at 0, 40 and 100% with FSR 3.1, the game's own and Off) - Any AMD, Intel or Deck at Render resolution 50% and 67% with the game's own upscaler: the same, expecting the depth to be there (its networks are left out on those cards) (@Beanstalk Sharpness 40% at 50% Render resolution) - Steam Deck or another integrated GPU: frame time at Sharpness 0 against 40% (by hand) - DLSS Performance: leaves and roofs against the sky while turning, expecting no visible flicker at 40% (by hand; measured above) - HDR by eye on an HDR screen: Vanilla, Expanded, and PsychoV35 with another upscaler than the game's own (by hand; measured above) ## Measurements **Verdict:** It leaves the HUD alone and the sky nearly so, and sharpens near detail more than main. At 40%, house walls come out about as on main: the gain there is small. Frame rates overlap at 0%; at 40% the two averages differ by about 1.5%, about the size of the spread between runs. The pass costs about 0.055 ms of GPU a frame at 1920x1080 on an RTX 5080 (not a timing run). Setup: Windows 11, RTX 5080, driver 621.47, DLAA at 1920x1080, the Market (child). Frame rates: `dev.py ab`'s timing queue, 2 runs of 45 s a side, interleaved, warmed up, the same game folder with only `longshot_vk.dll` different. The machine is CPU-bound in the Market (about 122 fps). The tool wrote no summary (Windows handle numbers in the switches differ run to run); the numbers are its own lines, below. The "after" frame rates are the build before the rebases; they bring no change to what is measured. The fine detail and flicker rows are from an earlier build with the same shader (2 rounds, standing still and a steady turn). The baseline is main's `longshot_vk.dll` at 0aeb68589. | | Before: main @ 0aeb68589 | After: this PR @ eeaf24c22 | |---|---|---| | Market, 40%: fps, two runs | 122.5, 123.8 | 119.9, 122.6 | | Market, 40%: 1% low fps | 98.6, 100.2 | 89.7, 98.4 | | Market, 0%: fps, two runs | 125.2, 120.3 | 122.4, 126.0 | | Market, 0%: 1% low fps | 100.5, 86.4 | 97.1, 99.8 | | Minimap, fine detail at 40% / 100% (1.00 = as at 0%) | 1.08 / 1.20 | 1.00 / 1.00 | | Distant castle, 40% / 100% | 1.20 / 1.79 | 0.98 / 1.14 | | Near paving, 40% / 100% | 1.10 / 1.56 | 1.26 / 2.33 | | House wall, 40% / 100% | 1.22 / 1.66 | 1.23 / 2.21 | | Flicker while turning, 0% / 40% / 100% (lower is steadier) | 2.6 / 2.9 / 3.5 | 2.4 / 2.6 / 4.1 | `RX_VK_SHARPEN_DEPTH` ships on: at 100% the sky's fine detail is ×0.98 of 0% with it and ×2.11 without, and the distant castle ×1.18 against ×2.25, for about 0.01 ms (a rough number). At 100% the new one is stronger and flickers more than the old one, which is why the menu starts lower. Flicker in a camera turn on caee78a54 (average of two turns; lower is steadier; compare along a row only): | | 0% | 40% | 100% | |---|---|---|---| | SDR, DLSS 50% | 2.4 | 2.9 (+19%; at 50%: +18%) | 4.1 (+71%) | | Vanilla, DLAA | 1.5 | 1.6 (+11%) | 2.4 (+66%) | | Vanilla, the game's own | 6.9 (one turn) | 6.6 (-4%) | 8.7 (+26%) | | Expanded, DLAA | 3.4 | 3.8 (+11%) | 5.5 (+63%) | | Expanded, the game's own | 11.7 | 12.5 (+7%) | 15.0 (+28%) | | PsychoV35, the game's own | 6.0 | 6.4 (+7%) | 8.1 (+36%) | | PsychoV35, DLSS 67% | 1.5 | 1.8 (+21%) | 2.8 (+84%) | | PsychoV35, DLSS 50% | 1.5 | 1.8 (+20%) | 2.4 (+58%) | | PsychoV35, FSR 3.1 67% | 1.3 | 1.4 (+9%) | 2.1 (+59%) | | PsychoV35, Off | 2.7 | 2.9 (+7%) | 4.1 (+53%) | | PsychoV35, XeSS 67% | 1.2 | 1.2 (-3%) | 1.8 (+48%) | | PsychoV35, XeSS Native AA | 1.2 | 1.5 (+19%) | 1.7 (+39%) | ```text A1: 5513 frames in 45 s, 122.5 fps, median 8.03 ms, p99 10.14 ms, 1% low 98.6 fps B1: 5397 frames in 45 s, 119.9 fps, median 8.15 ms, p99 11.15 ms, 1% low 89.7 fps A2: 5571 frames in 45 s, 123.8 fps, median 7.93 ms, p99 9.98 ms, 1% low 100.2 fps B2: 5516 frames in 45 s, 122.6 fps, median 8.03 ms, p99 10.16 ms, 1% low 98.4 fps vk: m 0.055 ms 1.0 x 55.0 us 1.0 items 0.00 MB m sharpen vk: sharpness: 40% on the 3D scene before the HUD, 1920x1080, B10G11R11, by the scene's depth (sky at 25041 m) ``` ## Risks - Weak GPUs: a full-size copy, one pass and five depth reads a pixel, not measured on one. - CPU: with the game's own upscaler, the scene's camera is now read for each scene-sized draw while Sharpness is above 0, as it already is with DLSS, FSR and XeSS. The cost is not measured alone. - A card that cannot write the game's usual picture format (B10G11R11) is not sharpened there and says why in the log; PsychoV35's (RGBA16F) still is. Run only on stand-in devices in `tests/test_sharpen.py`. - PsychoV35 with the game's own upscaler: the picture is found for Sharpness alone, so mods' effects, ReShade and frame generation get what they did. - What a player notices: the HUD, menus and movies are no longer sharpened, 100% is stronger, and presets keep their old numbers (30 to 50%). Saves, `settings.toml` and caches: nothing. - Off: Sharpness 0 runs none of it. A revert is enough. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Screenshots of the same spot on `main` and here, for a change that shows on screen. - [x] The SPIR-V headers regenerated (a shader changed). - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The row sharpened the finished picture in the window pass, held to each pixel's neighbours, so thin lines and texture
came out unchanged and the HUD was sharpened. It now runs once on the upscaled scene (vk_sharpen.cpp), in SDR and
Native HDR, less far away and on outlines, never on the sky. RCAS: AMD FidelityFX FSR 1 (MIT).

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Its push constant, its request in the present trace and the comments that placed it there go.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
40% with FSR 4 and XeSS, 30% with the game's own (a judgement: no source gives one).

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
From a cold review. The HDR range by the brightest around the pixel is as OptiScaler's RCAS has it.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
test: the Upscaler's and Render resolution's help say where Sharpness starts now
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
54ae50510d
Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, RTX 5080, driver 621.47, DLAA at 1920x1080. SDR: the Market, Link's house, the Shadow Temple, the Bottom of the Well and Dodongo's Cavern at 0 to 100%: near detail sharper, HUD and sky unchanged, dark areas clean at 40%. Native HDR: Vanilla and PsychoV35: nothing over the 1000 nit peak, highlights unchanged. Run on eeaf24c22, before the rebase to 54ae50510, which brings nothing this touches.

Tested in game: Windows 11, RTX 5080, driver 621.47, DLAA at 1920x1080. SDR: the Market, Link's house, the Shadow Temple, the Bottom of the Well and Dodongo's Cavern at 0 to 100%: near detail sharper, HUD and sky unchanged, dark areas clean at 40%. Native HDR: Vanilla and PsychoV35: nothing over the 1000 nit peak, highlights unchanged. Run on eeaf24c22, before the rebase to 54ae50510, which brings nothing this touches.
Author
Member

Screenshots. Windows 11, RTX 5080, DLAA at 1920x1080, the Market, cropped and enlarged.

main (OLD) and this pull request (NEW), same spot, SDR. At 40% the two look close on walls and roofs. At 100% the new one is stronger up close and much weaker on the far castle.

old and new

What depth does, at 100%.

depth off and on

HDR (Native), Vanilla and PsychoV35. Shown for a normal screen, with 400 nits as white.

HDR

The menu's new help text. Taken in an earlier build.

menu

Screenshots. Windows 11, RTX 5080, DLAA at 1920x1080, the Market, cropped and enlarged. **`main` (OLD) and this pull request (NEW), same spot, SDR.** At 40% the two look close on walls and roofs. At 100% the new one is stronger up close and much weaker on the far castle. ![old and new](https://git.magicbean.dev/attachments/d30655aa-3799-4cfa-9fe1-2c1fb33b5816) **What depth does, at 100%.** ![depth off and on](https://git.magicbean.dev/attachments/b29f2e8e-f742-411a-8bb3-86fbea3be944) **HDR (Native), Vanilla and PsychoV35.** Shown for a normal screen, with 400 nits as white. ![HDR](https://git.magicbean.dev/attachments/d243418f-4500-4b75-8a1e-8e05e37b4dd3) **The menu's new help text.** Taken in an earlier build. ![menu](https://git.magicbean.dev/attachments/d2686fe9-78c2-4efa-88ad-9b30e4dd515d)
llun force-pushed feat/sharpen-scene-rcas from 54ae50510d
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to caee78a54f
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-12-03 22:14:06 +00:00
Compare
Author
Member

Updated: rebased onto main 6318f4056, and Sharpness now also works with PsychoV35 (Native HDR) and the game's own upscaler. Before, the slider did nothing there.

  • Change: only Sharpness gets this picture. Mods' effects, ReShade and frame generation get what they did.
  • Bug found and fixed on the way: the game's upscaler writes light below zero at some edges. A first version cut it to 0, so 1.6% of the Market's picture turned black at 40%. Now there are no such pixels at 0, 40 or 100%.
  • Tested in the game: Windows 11, RTX 5080, driver 621.47. The Market at 100% and 67% Render resolution, the Shadow Temple and Dodongo's Cavern. Played by hand on an HDR screen in the Market at 40%: looks good.
  • Not measured: flicker in a fast turn with this combination. The test's camera stopped after about 1 degree.
Updated: rebased onto main 6318f4056, and Sharpness now also works with PsychoV35 (Native HDR) and the game's own upscaler. Before, the slider did nothing there. - **Change:** only Sharpness gets this picture. Mods' effects, ReShade and frame generation get what they did. - **Bug found and fixed on the way:** the game's upscaler writes light below zero at some edges. A first version cut it to 0, so 1.6% of the Market's picture turned black at 40%. Now there are no such pixels at 0, 40 or 100%. - **Tested in the game:** Windows 11, RTX 5080, driver 621.47. The Market at 100% and 67% Render resolution, the Shadow Temple and Dodongo's Cavern. Played by hand on an HDR screen in the Market at 40%: looks good. - **Not measured:** flicker in a fast turn with this combination. The test's camera stopped after about 1 degree.
Author
Member

More tests in the game on caee78a54: every upscaler that runs on an RTX 5080 with PsychoV35, plus Vanilla and Expanded HDR and DLSS at 50%. The description has the numbers. The picture shows PsychoV35, for a normal screen.

Correction: the description said that at 40% a turn flickers as it does at 0%. With more tests it is between about the same and 21% more.

PsychoV35 with each upscaler at 0, 40 and 100%

More tests in the game on caee78a54: every upscaler that runs on an RTX 5080 with PsychoV35, plus Vanilla and Expanded HDR and DLSS at 50%. The description has the numbers. The picture shows PsychoV35, for a normal screen. Correction: the description said that at 40% a turn flickers as it does at 0%. With more tests it is between about the same and 21% more. ![PsychoV35 with each upscaler at 0, 40 and 100%](https://git.magicbean.dev/attachments/662d14b4-48f9-4b2e-a3c3-a93229f47420)
Author
Member
@review
BeanBot left a comment

Recommendation: Request changes. The pass creates a packed-format shader without checking the Vulkan feature it requires, and its new test bypasses the selected C++ compiler. The feature also needs the outstanding Tier 1 runs and a measurement of its cost on a weaker GPU.

Sharpness moves from the finished window picture to the upscaled 3D scene, adds depth-sensitive RCAS and HDR handling, and leaves the HUD untouched. The new path adds a full-resolution copy, a compute pass and depth reads when enabled.

Blocking (1): must change before merging.

  1. L1 gpu/vk/vk_sharpen.cpp:127: The packed-format pipeline is created unconditionally without checking shaderStorageImageExtendedFormats, and both pipelines must succeed before either format can be sharpened. (more on the line) Do: Check the feature and format capabilities and create each pipeline independently; use a supported fallback for the packed picture or report that format unavailable without disabling RGBA16F.

Should fix (1): not blocking, but worth doing before merging.

  • L2 tests/test_sharpen.py:24: The new check hard-codes g++ instead of using the compiler selected by the test runner. (more on the line) Do: Declare --cxx with the runner's {cxx} placeholder and use the selected compiler as the standalone default.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L3 gpu/vk/vk_sharpen.cpp:243: The new full-resolution copy and depth-sampling pass have not been measured on a weaker GPU. (more on the line) Do: Measure frame time, 1% lows and VRAM on a Steam Deck or comparable integrated GPU at 0% and 40%, using the same scene and settings over repeated runs. (@fix does its part first: Reduce or avoid the full-resolution copy and depth reads, or use a cheaper path on bandwidth-limited devices.)
  • L4 gpu/vk/shaders/sharpen.comp:76: The new rendering and depth path has not yet run on the other affected Tier 1 hardware. (more on the line) Do: Run the requested 0%, 40% and 100% checks on AMD and Steam Deck, including the game's own upscaler at reduced resolution, and verify the depth log and picture.

@fix can do L1, L2 and L3.

Checks: Still running: 11 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes for the demonstrated visual behavior: the author's Windows RTX 5080 runs show sharper near detail and an unchanged HUD. Performance is not a claimed gain: two 40% runs measured 122.5/123.8 fps on main and 119.9/122.6 here, with overlapping spreads; the cost on weaker GPUs is unmeasured.

Other systems: The pass affects all upscalers, HDR modes, frame generation and mods' world and screen effects. The author tested several combinations on Windows with NVIDIA; AMD, Intel, Linux and Steam Deck remain untested. The RGBA16F-only path deliberately withholds the newly found picture from effects and frame generation.

Switches: RX_VK_SHARPEN_DEPTH is added, default on, with a switches.def row; 0 disables depth weighting. The default's visual effect was measured on NVIDIA, but its behavior and cost on other supported hardware remain to be tested. RX_VK_UPSCALE_LOG's documented output changes because sharpness moved out of the window pass.

Reviewed: caee78a54f against 6318f4056e: Read the repository rules and PR template, the new shader, sharpening implementation and test, the principal draw and temporal diffs and their relevant callers, and the frame-generation, settings and test diffs. Skimmed translations, documentation, generated-file claims and remaining changed tests; did not read every changed code file in full. Screenshot attachments were unavailable in the closed network.; nothing run (a code review).

Checked and fine:

  • The changed commits record AI assistance.
  • The new switch has a table row, and shader recipes include both variants.
  • The author's runs cover several upscalers and HDR modes, including the RGBA16F game-upscaler path.

Testing: No commands that build or run the project or tests were executed. The author's reported game runs and test results are described above; CI is still running.

Overlaps and merge order: PR #2940 remains open on the same Sharpness feature; the description distinguishes its approach. Merge order is not established.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** The pass creates a packed-format shader without checking the Vulkan feature it requires, and its new test bypasses the selected C++ compiler. The feature also needs the outstanding Tier 1 runs and a measurement of its cost on a weaker GPU. Sharpness moves from the finished window picture to the upscaled 3D scene, adds depth-sensitive RCAS and HDR handling, and leaves the HUD untouched. The new path adds a full-resolution copy, a compute pass and depth reads when enabled. **Blocking (1)**: must change before merging. 1. **L1** `gpu/vk/vk_sharpen.cpp:127`: The packed-format pipeline is created unconditionally without checking shaderStorageImageExtendedFormats, and both pipelines must succeed before either format can be sharpened. (more on the line) **Do:** Check the feature and format capabilities and create each pipeline independently; use a supported fallback for the packed picture or report that format unavailable without disabling RGBA16F. **Should fix (1)**: not blocking, but worth doing before merging. - **L2** `tests/test_sharpen.py:24`: The new check hard-codes g++ instead of using the compiler selected by the test runner. (more on the line) **Do:** Declare --cxx with the runner's {cxx} placeholder and use the selected compiler as the standalone default. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L3** `gpu/vk/vk_sharpen.cpp:243`: The new full-resolution copy and depth-sampling pass have not been measured on a weaker GPU. (more on the line) **Do:** Measure frame time, 1% lows and VRAM on a Steam Deck or comparable integrated GPU at 0% and 40%, using the same scene and settings over repeated runs. *(`@fix` does its part first: Reduce or avoid the full-resolution copy and depth reads, or use a cheaper path on bandwidth-limited devices.)* - **L4** `gpu/vk/shaders/sharpen.comp:76`: The new rendering and depth path has not yet run on the other affected Tier 1 hardware. (more on the line) **Do:** Run the requested 0%, 40% and 100% checks on AMD and Steam Deck, including the game's own upscaler at reduced resolution, and verify the depth log and picture. `@fix` can do L1, L2 and L3. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the demonstrated visual behavior: the author's Windows RTX 5080 runs show sharper near detail and an unchanged HUD. Performance is not a claimed gain: two 40% runs measured 122.5/123.8 fps on main and 119.9/122.6 here, with overlapping spreads; the cost on weaker GPUs is unmeasured. **Other systems:** The pass affects all upscalers, HDR modes, frame generation and mods' world and screen effects. The author tested several combinations on Windows with NVIDIA; AMD, Intel, Linux and Steam Deck remain untested. The RGBA16F-only path deliberately withholds the newly found picture from effects and frame generation. **Switches:** RX_VK_SHARPEN_DEPTH is added, default on, with a switches.def row; 0 disables depth weighting. The default's visual effect was measured on NVIDIA, but its behavior and cost on other supported hardware remain to be tested. RX_VK_UPSCALE_LOG's documented output changes because sharpness moved out of the window pass. **Reviewed:** caee78a54f1a against 6318f4056eed: Read the repository rules and PR template, the new shader, sharpening implementation and test, the principal draw and temporal diffs and their relevant callers, and the frame-generation, settings and test diffs. Skimmed translations, documentation, generated-file claims and remaining changed tests; did not read every changed code file in full. Screenshot attachments were unavailable in the closed network.; nothing run (a code review). **Checked and fine:** - The changed commits record AI assistance. - The new switch has a table row, and shader recipes include both variants. - The author's runs cover several upscalers and HDR modes, including the RGBA16F game-upscaler path. **Testing:** No commands that build or run the project or tests were executed. The author's reported game runs and test results are described above; CI is still running. **Overlaps and merge order:** PR #2940 remains open on the same Sharpness feature; the description distinguishes its approach. Merge order is not established. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -0,0 +73,4 @@
void main() {
const ivec2 g = ivec2(gl_GlobalInvocationID.xy);
if (any(greaterThanEqual(g, pc.size))) return;
const vec3 c = light(g);
Member

L4 (should fix): The new rendering and depth path has not yet run on the other affected Tier 1 hardware.

When: AMD on Windows and Linux and Steam Deck can take different shader, image-format and scene-depth paths from the tested Windows NVIDIA system.

Do: Run the requested 0%, 40% and 100% checks on AMD and Steam Deck, including the game's own upscaler at reduced resolution, and verify the depth log and picture.

**L4** (should fix): The new rendering and depth path has not yet run on the other affected Tier 1 hardware. *When:* AMD on Windows and Linux and Steam Deck can take different shader, image-format and scene-depth paths from the tested Windows NVIDIA system. **Do:** Run the requested 0%, 40% and 100% checks on AMD and Steam Deck, including the game's own upscaler at reduced resolution, and verify the depth log and picture.
@ -0,0 +124,4 @@
VkSamplerCreateInfo si{VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO};
si.addressModeU = si.addressModeV = si.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
if (vkCreateSampler(dev.device, &si, nullptr, &s.point) != VK_SUCCESS) return false;
if (!make_pipe(s, BUILTIN_SPV(SHARPEN_COMP_SPV), s.pipe[0]) || !make_pipe(s, BUILTIN_SPV(SHARPEN_RGBA_COMP_SPV), s.pipe[1]))
Member

L1 (blocking): The packed-format pipeline is created unconditionally without checking shaderStorageImageExtendedFormats, and both pipelines must succeed before either format can be sharpened.

When: On a device without that optional Vulkan feature, the r11f_g11f_b10f storage-image shader requires an unsupported capability. Pipeline creation is invalid or fails, so even an otherwise supported RGBA16F picture cannot use Sharpness.

Do: Check the feature and format capabilities and create each pipeline independently; use a supported fallback for the packed picture or report that format unavailable without disabling RGBA16F.

**L1** (blocking): The packed-format pipeline is created unconditionally without checking shaderStorageImageExtendedFormats, and both pipelines must succeed before either format can be sharpened. *When:* On a device without that optional Vulkan feature, the r11f_g11f_b10f storage-image shader requires an unsupported capability. Pipeline creation is invalid or fails, so even an otherwise supported RGBA16F picture cannot use Sharpness. **Do:** Check the feature and format capabilities and create each pipeline independently; use a supported fallback for the packed picture or report that format unavailable without disabling RGBA16F.
@ -0,0 +240,4 @@
Push pc{};
pc.size[0] = (int32_t)w, pc.size[1] = (int32_t)h;
pc.amount = (float)row / 100.0f;
full_barrier(cmd, "sharpness: the picture as the upscaler wrote it");
Member

L3 (should fix): The new full-resolution copy and depth-sampling pass have not been measured on a weaker GPU.

When: A Steam Deck or integrated GPU with Sharpness enabled must copy the scene and run the full-size pass every frame; the RTX 5080's 0.055 ms span does not establish its frame-time or memory cost there.

Do: Measure frame time, 1% lows and VRAM on a Steam Deck or comparable integrated GPU at 0% and 40%, using the same scene and settings over repeated runs.

**L3** (should fix): The new full-resolution copy and depth-sampling pass have not been measured on a weaker GPU. *When:* A Steam Deck or integrated GPU with Sharpness enabled must copy the scene and run the full-size pass every frame; the RTX 5080's 0.055 ms span does not establish its frame-time or memory cost there. **Do:** Measure frame time, 1% lows and VRAM on a Steam Deck or comparable integrated GPU at 0% and 40%, using the same scene and settings over repeated runs.
@ -0,0 +21,4 @@
from srccut import block # noqa: E402
from test_fg_scale_sharpen import SHIM # noqa: E402
RUN_ALL_ARGS = ["--cxx", "g++"]
Member

L2 (should fix): The new check hard-codes g++ instead of using the compiler selected by the test runner.

When: On a supported Windows or Linux setup with clang++ selected and no g++ on PATH, run_all marks this check missing and skips it; when both exist, it ignores CXX and tests a different compiler.

Do: Declare --cxx with the runner's {cxx} placeholder and use the selected compiler as the standalone default.

**L2** (should fix): The new check hard-codes g++ instead of using the compiler selected by the test runner. *When:* On a supported Windows or Linux setup with clang++ selected and no g++ on PATH, run_all marks this check missing and skips it; when both exist, it ignores CXX and tests a different compiler. **Do:** Declare --cxx with the runner's {cxx} placeholder and use the selected compiler as the standalone default.
Author
Member

Updated to 78fc956f0, rebased on main 7375aa551. Answers to BeanBot's review:

Point Answer
L1: the packed shader needs an optional feature Fixed. Each format makes its own shader. The packed one is made only if the card has the feature and can write that format. Without it, the log says so, and PsychoV35's picture is still sharpened.
L2: the test always used g++ Fixed. It uses the runner's compiler. It also has a new part that checks which shaders each kind of card gets. That part fails with the feature check taken out.
L3: not measured on a slow GPU Agreed. I have no such hardware. It is in Still to test, by hand.
L4: not run on AMD or Steam Deck Agreed. It is in Still to test, and I am asking the Test Farm.

Tested again in the game on 78fc956f0 (RTX 5080, Windows 11, sandbox off as main has it): SDR with DLAA, and PsychoV35 with the game's own upscaler. No errors in the log.

Full test run (1d923a7fb, before the last rebase): 826 passed, 18 failed, 51 skipped. None of the 18 comes from this pull request; the description says why for each. After the rebase I reran only what it could affect, and did not rerun the full suite.

New on main: Snapdragon GSR 2. Sharpness works with it, but it has a fine dot pattern of its own that Sharpness strengthens. So the menu gives no number for it.

Updated to 78fc956f0, rebased on main 7375aa551. Answers to BeanBot's review: | Point | Answer | |---|---| | **L1**: the packed shader needs an optional feature | Fixed. Each format makes its own shader. The packed one is made only if the card has the feature and can write that format. Without it, the log says so, and PsychoV35's picture is still sharpened. | | **L2**: the test always used `g++` | Fixed. It uses the runner's compiler. It also has a new part that checks which shaders each kind of card gets. That part fails with the feature check taken out. | | **L3**: not measured on a slow GPU | Agreed. I have no such hardware. It is in Still to test, by hand. | | **L4**: not run on AMD or Steam Deck | Agreed. It is in Still to test, and I am asking the Test Farm. | **Tested again in the game on 78fc956f0** (RTX 5080, Windows 11, sandbox off as main has it): SDR with DLAA, and PsychoV35 with the game's own upscaler. No errors in the log. **Full test run** (1d923a7fb, before the last rebase): 826 passed, 18 failed, 51 skipped. None of the 18 comes from this pull request; the description says why for each. After the rebase I reran only what it could affect, and did not rerun the full suite. **New on main:** Snapdragon GSR 2. Sharpness works with it, but it has a fine dot pattern of its own that Sharpness strengthens. So the menu gives no number for it.
llun force-pushed feat/sharpen-scene-rcas from caee78a54f
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 78fc956f07
Some checks reported errors
beanstalk/approval approved by llun (reviewed)
beanstalk/windows+amd 0/1 pass, 2 error
beanstalk/linux+amd 0/1 pass, 2 error
beanstalk/steamdeck 0/1 pass, 0 running, 0 queued
PR description / Title and description (pull_request_target) Successful in 5s
CI / What the change needs (pull_request) Successful in 6s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 22s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m29s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 21m12s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 15m43s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 14m59s
CI / Website build and checks (pull_request) Successful in 1m18s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 52m42s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1h0m5s
2026-12-04 01:49:12 +00:00
Compare
Author
Member

@Beanstalk On AMD (Windows and Linux) and Steam Deck: Sharpness at 0, 40 and 100% with FSR 3.1, the game's own upscaler and Off, then Sharpness 40% at 50% Render resolution with the game's own. Expected: the 3D scene gets sharper, the HUD does not change, there are no errors, and the log's vk: sharpness: line says "by the scene's depth".

@Beanstalk On AMD (Windows and Linux) and Steam Deck: Sharpness at 0, 40 and 100% with FSR 3.1, the game's own upscaler and Off, then Sharpness 40% at 50% Render resolution with the game's own. Expected: the 3D scene gets sharper, the HUD does not change, there are no errors, and the log's `vk: sharpness:` line says "by the scene's depth".
Member

@llun the PR got a new push (78fc956) after your comment. Review it and approve again.

@llun the PR got a new push (`78fc956`) after your comment. Review it and approve again.
Author
Member

@Beanstalk On AMD (Windows and Linux) and Steam Deck, at 78fc956f0: Sharpness at 0, 40 and 100% with FSR 3.1, the game's own upscaler and Off, then Sharpness 40% at 50% Render resolution with the game's own. A screenshot at each. Expected: no errors or crashes, and the log's vk: sharpness: line says "by the scene's depth".

@Beanstalk On AMD (Windows and Linux) and Steam Deck, at 78fc956f0: Sharpness at 0, 40 and 100% with FSR 3.1, the game's own upscaler and Off, then Sharpness 40% at 50% Render resolution with the game's own. A screenshot at each. Expected: no errors or crashes, and the log's `vk: sharpness:` line says "by the scene's depth".
Member

Beanstalk test farm · 🔄 testing (4 of 3 reports so far)

Commit 78fc956 · approved by llun (reviewed) · dashboard

⚠️ Note: The depth log is checked over the whole start, not independently for each setting; Sharpness at 0% does not run the filter.
⚠️ Note: Screenshots are compared with main but cannot independently prove depth weighting or HUD isolation; HDR and moving-camera flicker are not measured.
⚠️ Note: The 0% and 40% GPU timings and VRAM are reported for both builds, but the plan does not separately enforce their within-PR cost difference.

Done (started 01:50 UTC, last report 01:50 UTC). Comment @Beanstalk to run it again.

Target Result Reports Frame time p99 (ms), main → PR VRAM peak (MB) Crashes
windows+amd ⚠️ couldn't be judged 2 1 2 — — none
linux+amd ⚠️ couldn't be judged 2 1 2 — — none
steamdeck ⏳ queued 0 of 1 — — —

Couldn't be judged: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own.

  • windows+amd, report 1: main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store's
  • windows+amd, report 2: main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store's
  • linux+amd, report 1: main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store's
  • linux+amd, report 2: main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store's
What was tested

What will be tested · AI plan (gpt-6.1-terra)

On AMD Windows, AMD Linux and Steam Deck, the plan tests the requested Sharpness and upscaler combinations in the Market, including the game's own upscaler at 50% render resolution. Three starts per side capture screenshots at each combination and measure 20-second uncapped GPU and frame times at 0% and 40% Sharpness. A crash, a Vulkan error, a missing depth-sharpening log line, an excessive screenshot difference or a frame-time regression beyond the stated limits fails the PR. The Steam Deck target will wait for an online tester. No tester online now matches steamdeck: that target waits for one.

  • Where: windows+amd (1-2 reports), linux+amd (1-2 reports), steamdeck (1-2 reports).
  • market-sharpness: from the repository's save market-entrance (settings dlss=0, vsync=2, sharpness=0, resolution=1, frame_rate_cap=6, quality_preset=0; switches HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0), then teleport to Market, take the picture own-0 to compare with main, measure own-0 for 20 s (after 10 s warm-up), set sharpness to 40, take the picture own-40 to compare with main, measure own-40 for 20 s (after 10 s warm-up), set sharpness to 100, take the picture own-100 to compare with main, set resolution to 4, take the picture own-50res-40 to compare with main, set resolution to 1, set dlss to 3, set sharpness to 0, take the picture fsr-0 to compare with main, take the picture fsr-40 to compare with main, take the picture fsr-100 to compare with main, set dlss to 6, take the picture off-0 to compare with main, take the picture off-40 to compare with main, take the picture off-100 to compare with main; 3 runs on each side.
  • Measured: crashes, frame times, stutters and hitches, GPU time per pass, VRAM use, the game's log.
  • The PR fails if: it crashes; or a picture differs from main by more than 25%; or GPU time a frame is more than 20% above main; or frame time (p99) is more than 20% above main; or forbidden log lines is above 0; or expected log lines missing is above 0; or frame time (worst 1%) is more than 20% above main.
  • Time: about 39 min of game runs per tester (6 game starts), plus the two builds.
Measurements on `windows+amd`, for the PR description

Verdict: could not be judged on windows+amd (2 reports).

Hardware: 1: windows+amd+amd-proprietary+igpu+window+xess AMD Radeon(TM) Graphics, 2.0.279 AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM; 2: windows+amd+amd-proprietary+dgpu+window AMD Radeon RX 6950 XT, 2.0.353 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM
Scene: market-sharpness, from the repository's save market-entrance (dlss=0, vsync=2, sharpness=0, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-sharpness: 3 game starts a side, own-0 20 s after 10 s warm-up, own-40 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Nothing was measured: no metric came back.

Flags and settings

None: the plan varied no setting, switch or build option.

As Markdown for the PR description:

## Measurements

**Verdict:** could not be judged on windows+amd (2 reports).

Hardware: 1: windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM`; 2: windows+amd+amd-proprietary+dgpu+window `AMD Radeon RX 6950 XT, 2.0.353` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM`  
Scene: market-sharpness, from the repository's save market-entrance (dlss=0, vsync=2, sharpness=0, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-sharpness: 3 game starts a side, own-0 20 s after 10 s warm-up, own-40 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

Nothing was measured: no metric came back.

**Flags and settings**

None: the plan varied no setting, switch or build option.
Measurements on `linux+amd`, for the PR description

Verdict: could not be judged on linux+amd (2 reports).

Hardware: 1: linux+amd+radv+dgpu AMD Radeon RX 9070 (RADV GFX1201), 26.3.1 AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM; 2: linux+amd+radv+dgpu AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1 AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM
Scene: market-sharpness, from the repository's save market-entrance (dlss=0, vsync=2, sharpness=0, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-sharpness: 3 game starts a side, own-0 20 s after 10 s warm-up, own-40 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Nothing was measured: no metric came back.

Flags and settings

None: the plan varied no setting, switch or build option.

As Markdown for the PR description:

## Measurements

**Verdict:** could not be judged on linux+amd (2 reports).

Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.3.1` `AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM`  
Scene: market-sharpness, from the repository's save market-entrance (dlss=0, vsync=2, sharpness=0, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-sharpness: 3 game starts a side, own-0 20 s after 10 s warm-up, own-40 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

Nothing was measured: no metric came back.

**Flags and settings**

None: the plan varied no setting, switch or build option.
The testers' hardware
Target Report Ran on
windows+amd 1 windows+amd+amd-proprietary+igpu+window+xess AMD Radeon(TM) Graphics, 2.0.279 AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM
windows+amd 2 windows+amd+amd-proprietary+dgpu+window AMD Radeon RX 6950 XT, 2.0.353 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM
linux+amd 1 linux+amd+radv+dgpu AMD Radeon RX 9070 (RADV GFX1201), 26.3.1 AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM
linux+amd 2 linux+amd+radv+dgpu AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1 AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM
<!-- beanstalk:sticky --> ### Beanstalk test farm · 🔄 testing (4 of 3 reports so far) Commit `78fc956` · approved by llun (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/3118) ⚠️ **Note:** The depth log is checked over the whole start, not independently for each setting; Sharpness at 0% does not run the filter. ⚠️ **Note:** Screenshots are compared with main but cannot independently prove depth weighting or HUD isolation; HDR and moving-camera flicker are not measured. ⚠️ **Note:** The 0% and 40% GPU timings and VRAM are reported for both builds, but the plan does not separately enforce their within-PR cost difference. Done (started 01:50 UTC, last report 01:50 UTC). Comment `@Beanstalk` to run it again. | Target | Result | Reports | Frame time p99 (ms), main → PR | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | --- | | `windows+amd` | ⚠️ couldn't be judged | 2 [1](https://beanstalk.magicbean.dev/reports/rp_cc591adc4ab4deb2) [2](https://beanstalk.magicbean.dev/reports/rp_eeda4ec598cc81da) | — | — | none | | `linux+amd` | ⚠️ couldn't be judged | 2 [1](https://beanstalk.magicbean.dev/reports/rp_b896ec58782a7227) [2](https://beanstalk.magicbean.dev/reports/rp_8dc1041d0d2e1d7d) | — | — | none | | `steamdeck` | ⏳ queued | 0 of 1 | — | — | — | **Couldn't be judged**: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own. - `windows+amd`, [report 1](https://beanstalk.magicbean.dev/reports/rp_cc591adc4ab4deb2): `main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store's` - `windows+amd`, [report 2](https://beanstalk.magicbean.dev/reports/rp_eeda4ec598cc81da): `main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store's` - `linux+amd`, [report 1](https://beanstalk.magicbean.dev/reports/rp_b896ec58782a7227): `main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store's` - `linux+amd`, [report 2](https://beanstalk.magicbean.dev/reports/rp_8dc1041d0d2e1d7d): `main's tools.lock: tools.lock line 32 (sdl): its first URLs are not Longshot's store's` <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) On AMD Windows, AMD Linux and Steam Deck, the plan tests the requested Sharpness and upscaler combinations in the Market, including the game's own upscaler at 50% render resolution. Three starts per side capture screenshots at each combination and measure 20-second uncapped GPU and frame times at 0% and 40% Sharpness. A crash, a Vulkan error, a missing depth-sharpening log line, an excessive screenshot difference or a frame-time regression beyond the stated limits fails the PR. The Steam Deck target will wait for an online tester. No tester online now matches steamdeck: that target waits for one. - **Where:** windows+amd (1-2 reports), linux+amd (1-2 reports), steamdeck (1-2 reports). - **market-sharpness:** from the repository's save `market-entrance` (settings dlss=0, vsync=2, sharpness=0, resolution=1, frame_rate_cap=6, quality_preset=0; switches `HOS_OUTPUT_RES=gpu`, `RX_VK_AUTO_TUNE=0`), then teleport to Market, take the picture own-0 to compare with main, measure own-0 for 20 s (after 10 s warm-up), set sharpness to 40, take the picture own-40 to compare with main, measure own-40 for 20 s (after 10 s warm-up), set sharpness to 100, take the picture own-100 to compare with main, set resolution to 4, take the picture own-50res-40 to compare with main, set resolution to 1, set dlss to 3, set sharpness to 0, take the picture fsr-0 to compare with main, take the picture fsr-40 to compare with main, take the picture fsr-100 to compare with main, set dlss to 6, take the picture off-0 to compare with main, take the picture off-40 to compare with main, take the picture off-100 to compare with main; 3 runs on each side. - **Measured:** crashes, frame times, stutters and hitches, GPU time per pass, VRAM use, the game's log. - **The PR fails if:** it crashes; or a picture differs from main by more than 25%; or GPU time a frame is more than 20% above main; or frame time (p99) is more than 20% above main; or forbidden log lines is above 0; or expected log lines missing is above 0; or frame time (worst 1%) is more than 20% above main. - **Time:** about 39 min of game runs per tester (6 game starts), plus the two builds. </details> <details><summary>Measurements on `windows+amd`, for the PR description</summary> **Verdict:** could not be judged on windows+amd (2 reports). Hardware: 1: windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM`; 2: windows+amd+amd-proprietary+dgpu+window `AMD Radeon RX 6950 XT, 2.0.353` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` Scene: market-sharpness, from the repository's save market-entrance (dlss=0, vsync=2, sharpness=0, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-sharpness: 3 game starts a side, own-0 20 s after 10 s warm-up, own-40 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** could not be judged on windows+amd (2 reports). Hardware: 1: windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM`; 2: windows+amd+amd-proprietary+dgpu+window `AMD Radeon RX 6950 XT, 2.0.353` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` Scene: market-sharpness, from the repository's save market-entrance (dlss=0, vsync=2, sharpness=0, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-sharpness: 3 game starts a side, own-0 20 s after 10 s warm-up, own-40 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>Measurements on `linux+amd`, for the PR description</summary> **Verdict:** could not be judged on linux+amd (2 reports). Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.3.1` `AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM` Scene: market-sharpness, from the repository's save market-entrance (dlss=0, vsync=2, sharpness=0, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-sharpness: 3 game starts a side, own-0 20 s after 10 s warm-up, own-40 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. **Flags and settings** None: the plan varied no setting, switch or build option. As Markdown for the PR description: ```markdown ## Measurements **Verdict:** could not be judged on linux+amd (2 reports). Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.3.1` `AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM` Scene: market-sharpness, from the repository's save market-entrance (dlss=0, vsync=2, sharpness=0, resolution=1, frame_rate_cap=6, quality_preset=0, HOS_OUTPUT_RES=gpu, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); market-sharpness: 3 game starts a side, own-0 20 s after 10 s warm-up, own-40 20 s after 10 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) Nothing was measured: no metric came back. **Flags and settings** None: the plan varied no setting, switch or build option. ``` </details> <details><summary>The testers' hardware</summary> | Target | Report | Ran on | | --- | --- | --- | | `windows+amd` | [1](https://beanstalk.magicbean.dev/reports/rp_cc591adc4ab4deb2) | windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM` | | `windows+amd` | [2](https://beanstalk.magicbean.dev/reports/rp_eeda4ec598cc81da) | windows+amd+amd-proprietary+dgpu+window `AMD Radeon RX 6950 XT, 2.0.353` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` | | `linux+amd` | [1](https://beanstalk.magicbean.dev/reports/rp_b896ec58782a7227) | linux+amd+radv+dgpu `AMD Radeon RX 9070 (RADV GFX1201), 26.3.1` `AMD Ryzen 5 7600X3D 6-Core Processor, 32 GB RAM` | | `linux+amd` | [2](https://beanstalk.magicbean.dev/reports/rp_8dc1041d0d2e1d7d) | linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM` | </details>
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The format and compiler fixes address the two code items, and the feature has been shown working on an RTX 5080. The weaker-GPU cost and affected Tier 1 hardware runs are still outstanding. Recommend approval; not approved on the forge.

Sharpness moves to the upscaled 3D scene before the HUD, with depth-aware RCAS and HDR handling. It preserves the HUD and improves near detail, at the cost of a full-resolution copy and compute pass and stronger flicker at high settings.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L3 gpu/vk/vk_sharpen.cpp:243: The new full-resolution copy and depth-sampling pass have not been measured on a weaker GPU. When: A Steam Deck or integrated GPU with Sharpness enabled must copy the scene and run the full-size pass every frame; the RTX 5080's 0.055 ms span does not establish its frame-time or memory cost there. Do: Measure frame time, 1% lows and VRAM on a Steam Deck or comparable integrated GPU at 0% and 40%, using the same scene and settings over repeated runs. (@fix does its part first: Reduce or avoid the full-resolution copy and depth reads, or use a cheaper path on bandwidth-limited devices.)
  • L4 gpu/vk/shaders/sharpen.comp:76: The new rendering and depth path has not yet run on the other affected Tier 1 hardware. When: AMD on Windows and Linux and Steam Deck can take different shader, image-format and scene-depth paths from the tested Windows NVIDIA system. Do: Run the requested 0%, 40% and 100% checks on AMD and Steam Deck, including the game's own upscaler at reduced resolution, and verify the depth log and picture.

@fix can do L3.

Since the last review (on caee78a54f)
Resolved: L1 (The packed-format pipeline is created unconditionally without checking shaderStorageImageE…); L2 (The new check hard-codes g++ instead of using the compiler selected by the test runner.)
Still open: L3 (The new full-resolution copy and depth-sampling pass have not been measured on a weaker GP…); L4 (The new rendering and depth path has not yet run on the other affected Tier 1 hardware.)

Checks: Still running: 11 checks.

Also noticed (2; not asked for, not blocking)
  • The reported GSR 2 picture has a fine dot pattern that Sharpness strengthens.
  • The full test suite was not rerun after the final rebase.
More: does it help, other systems, switches, what was read

Does it help: Yes for the demonstrated visual change: the author's Market measurements show minimap detail unchanged at 40%, versus 1.08 times the 0% setting on main, and near paving detail at 1.26 versus 1.10. The reported RTX 5080 pass cost is about 0.055 ms, but weak-GPU cost remains unmeasured.

Other systems: The pass affects upscalers, HDR modes, depth capture, frame generation and Vulkan devices. Windows RTX 5080 game runs cover several modes; AMD, Intel, Steam Deck and Linux game runs remain outstanding. Linux host compilation is reported, without a full build or game run.

Switches: RX_VK_SHARPEN_DEPTH is added and defaults on; setting it to 0 disables depth attenuation. The reported sky and distant-detail measurements support the default. Sharpness remains at 0% by default.

Reviewed: 78fc956f07 against 7375aa5516: Read gpu/vk/vk_sharpen.cpp, gpu/vk/vk_sharpen.h, gpu/vk/shaders/sharpen.comp and tests/test_sharpen.py in full, along with the latest fix diff, commit list, repository rules and PR template. The remaining changed code and full base diff were not read in full; translations and recorded runs were skimmed.; nothing run (a code review).

Checked and fine:

  • The new stand-in test covers missing packed-format support and independent pipeline failures.
  • The reported current-head Windows game runs exercise SDR DLAA and PsychoV35 with the game's own upscaler.

Testing: No commands from the project were run for this review. The author reports current-head targeted checks and game runs; CI checks are still running.

Overlaps and merge order: PR 2940 also changes Sharpness; this PR describes the different placement and method. No merge order established.


Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The format and compiler fixes address the two code items, and the feature has been shown working on an RTX 5080. The weaker-GPU cost and affected Tier 1 hardware runs are still outstanding. Recommend approval; not approved on the forge. Sharpness moves to the upscaled 3D scene before the HUD, with depth-aware RCAS and HDR handling. It preserves the HUD and improves near detail, at the cost of a full-resolution copy and compute pass and stronger flicker at high settings. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L3** `gpu/vk/vk_sharpen.cpp:243`: The new full-resolution copy and depth-sampling pass have not been measured on a weaker GPU. *When:* A Steam Deck or integrated GPU with Sharpness enabled must copy the scene and run the full-size pass every frame; the RTX 5080's 0.055 ms span does not establish its frame-time or memory cost there. **Do:** Measure frame time, 1% lows and VRAM on a Steam Deck or comparable integrated GPU at 0% and 40%, using the same scene and settings over repeated runs. *(`@fix` does its part first: Reduce or avoid the full-resolution copy and depth reads, or use a cheaper path on bandwidth-limited devices.)* - **L4** `gpu/vk/shaders/sharpen.comp:76`: The new rendering and depth path has not yet run on the other affected Tier 1 hardware. *When:* AMD on Windows and Linux and Steam Deck can take different shader, image-format and scene-depth paths from the tested Windows NVIDIA system. **Do:** Run the requested 0%, 40% and 100% checks on AMD and Steam Deck, including the game's own upscaler at reduced resolution, and verify the depth log and picture. `@fix` can do L3. **Since the last review** (on caee78a54f1a) Resolved: L1 (The packed-format pipeline is created unconditionally without checking shaderStorageImageE…); L2 (The new check hard-codes g++ instead of using the compiler selected by the test runner.) Still open: L3 (The new full-resolution copy and depth-sampling pass have not been measured on a weaker GP…); L4 (The new rendering and depth path has not yet run on the other affected Tier 1 hardware.) **Checks:** Still running: 11 checks. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - The reported GSR 2 picture has a fine dot pattern that Sharpness strengthens. - The full test suite was not rerun after the final rebase. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the demonstrated visual change: the author's Market measurements show minimap detail unchanged at 40%, versus 1.08 times the 0% setting on main, and near paving detail at 1.26 versus 1.10. The reported RTX 5080 pass cost is about 0.055 ms, but weak-GPU cost remains unmeasured. **Other systems:** The pass affects upscalers, HDR modes, depth capture, frame generation and Vulkan devices. Windows RTX 5080 game runs cover several modes; AMD, Intel, Steam Deck and Linux game runs remain outstanding. Linux host compilation is reported, without a full build or game run. **Switches:** RX_VK_SHARPEN_DEPTH is added and defaults on; setting it to 0 disables depth attenuation. The reported sky and distant-detail measurements support the default. Sharpness remains at 0% by default. **Reviewed:** 78fc956f074c against 7375aa551611: Read gpu/vk/vk_sharpen.cpp, gpu/vk/vk_sharpen.h, gpu/vk/shaders/sharpen.comp and tests/test_sharpen.py in full, along with the latest fix diff, commit list, repository rules and PR template. The remaining changed code and full base diff were not read in full; translations and recorded runs were skimmed.; nothing run (a code review). **Checked and fine:** - The new stand-in test covers missing packed-format support and independent pipeline failures. - The reported current-head Windows game runs exercise SDR DLAA and PsychoV35 with the game's own upscaler. **Testing:** No commands from the project were run for this review. The author reports current-head targeted checks and game runs; CI checks are still running. **Overlaps and merge order:** PR 2940 also changes Sharpness; this PR describes the different placement and method. No merge order established. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch feat/sharpen-scene-rcas 2026-12-04 02:19:32 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!3118
No description provided.