fix(vk): no sky banding with Native HDR's PsychoV35: the scene's render targets in RGBA16F instead of R11G11B10F #2424

Open
Heliumrich wants to merge 1 commit from Heliumrich/Longshot:fix/sky-banding into main
First-time contributor

Summary

With HDR Native + the PsychoV35 tone mapper, the sky no longer bands: gradients, sunsets and the sun's glow are smooth, with no stripes and no colour fringes between them.

What was wrong. OoT draws its scene's light (the sky, the world, the clouds, the sun and the fog over it), the copies the refraction reads and the bloom chain into R11G11B10F render targets. Red and green keep 6 bits of mantissa and blue 5: each step is 1.6 % / 1.6 % / 3.1 % of the light. In a slow sky gradient that is a few dozen levels across the screen. A raw frame dump of Hyrule Field had 28 levels of blue over the top half of a 1440p sky, in bands about 24 rows tall, before the tone map. Every output showed them, PsychoV35 included: its tone map already writes RGBA16F (after RenoDX's zelda-oot-oz), but the light it maps was R11G11B10F. The three channels also round on their own grids, so a band's edge has blue rounding one way and green the other: the colour shifts at each step too.

What changes. While PsychoV35 is on, the host makes the game's R11G11B10F render targets (2D, one level, compressible: what the game's targets are; never a packaged texture) as RGBX16F (10 bits of mantissa per channel, alpha read as one as before):

  • The game makes a frame's render targets in a first-fit heap each frame and asks the host each one's storage size and alignment. The host answers both, the view offset and the texture made from one description (host/nvn_native.c made_desc, host/scene_format.h), so the heap sets the larger targets aside itself. At 2560x1440 the scene goes from 0xf00000 to 0x1e00000 bytes: the size of the RGBA16F target the game itself puts at that address later in the frame.
  • Only with PsychoV35: with the Vanilla tone map (Native Vanilla, Expanded, SDR) the game packs its square-root picture into the scene's storage through an R32UI view (RGB9E5), which RX_VK_LOG_R11_VIEWS=1 (new, diag) showed with DLSS, the game's own upscaler and Off; with PsychoV35 those targets are only ever colour. Those modes are unchanged (see Risks).
  • The renderer takes an R11G11B10F view over such a texture in the texture's own format (gpu/vk/vk_texture.h scene_view_format), for its views and its pipelines' targets. The temporal upscalers already take an RGBA16F scene under PsychoV35 (temporal_scene_format); the log now says PsychoV35 DLSS: RGBA16F linear route; scene format 97 (was 122).
  • HOS_SCENE_RGBA16F=0 (kill switch) keeps R11G11B10F.

With frame generation on, its frames still go through 8-bit storage in Native HDR and the bands come back: that is #2414's fix. This pull request fixes the light before the tone map; #2414 the frames after it.
Both are needed for a smooth sky with frame generation.

Read first: host/scene_format.h, then made_desc and its four callers in host/nvn_native.c.

Testing

Tested: Windows 11, NVIDIA GeForce RTX 4080, driver 621.35, Alienware AW3225QF (12-bit panel), 4K output, DLSS Quality preset M (1440p), grass 2x, no frame generation, built from this branch with the Builder v3.1.1 tools.

  • HDR Native + PsychoV35, Kakariko Village and Hyrule Field (noon, afternoon, the sun through the clouds): no banding at all on the display, no colour fringes. The log: scene format 97.
  • HDR Native + PsychoV35 with AMD FSR 3.1 (on the chain, 1200+ frames) and with the game's own upscaler and Off: no banding either. A run with RX_VK_LOG_R11_VIEWS=1 through DLSS, FSR 3.1, the game's own and Off logged no R11G11B10F storage seen through another format, no unexpected scene colour format and no PsychoV35 waits; the targets show in HOS_NVN_LOG_OBJECTS as format 0x71 at twice their size (960x540: 0x4b0000).
  • HDR Native + Vanilla, SDR and Expanded: as on main (R11G11B10F, the log's scene format 122).
  • Frame generation 2x (DLSS-FG): the bands come back in every mode, as on main (#2414).
  • Switching the HDR mode and tone mapper in play (PsychoV35, Vanilla, SDR, Expanded, in one session): each mode as described, no corruption.

Image quality (raw RGBA32F frame dumps, RX_VK_DUMP_RAW, Kakariko Village at the same spot, the top 35 % of the screen: the sky; this branch with PsychoV35 against the R11G11B10F scene of the same build; deviation: each pixel against a 15x15 average, in smooth areas):

The scene's light, sky region R11G11B10F (main) RGBA16F (this PR) Improvement
Distinct levels of blue, after the sky draw 34 1,195 35x
Distinct colours, after the sky draw 3,016 256,895 85x
Distinct colours, after the clouds, sun and fog pass 15,358 295,937 19x
Height of a band (rows of one colour, down a column) 3.5 1.0
Brightness steps: deviation, median / 99th percentile 0.18 % / 0.61 % 0.04 % / 0.37 % 4.7x
Colour steps (blue / green ratio): deviation, median / 99th percentile 0.43 % / 1.56 % 0.03 % / 0.21 % 13x / 7.6x
Step of a channel (format) 1.6 % / 1.6 % / 3.1 % 0.098 % 16x / 16x / 32x

The two dumps are frames of the same place a few minutes apart (the clouds move): the counts are what each format can hold there, not a pixel-for-pixel difference. A dither on the two sky programs was tried first and dropped: it broke up the bands but left a coloured grain (each channel rounding on its own grid) that looked worse.

Checks: tests/test_scene_format_rgba16f.py (new: the format rule, both ways and every condition, the sizes against host/nvn_layout.c, the wiring in nvn_native.c, vk_texture.*, vk_temporal.cpp, the switch), tests/test_shadow_slot.py and tests/test_pipeline_state_portable.py (updated for made_desc and scene_view_format), test_switch_table, test_settings_table, test_doc_anchors pass. run_all.py --changed main on Linux: every failure there fails on main too (test_dev_packs, test_readback_timeout_source, test_target_image_reuse, test_vram_compact, test_flat_map, test_wb_spans, test_rdna2_mesh_only, test_guest_holes), or needs a tool that machine lacks (clang++, the Vulkan and SPIR-V headers).

Still to test:

  • Linux, AMD (RADV) and Intel: PsychoV35, Hyrule Field's sky, the log's scene format 97 (@Beanstalk)
  • FSR 4 (AMD) and XeSS (no libxess.dll here) with PsychoV35: the sky smooth, no unexpected scene colour format in the log (@Beanstalk, or by hand)

Measurements

Verdict: within the spread: no cost measured.

Setup: Windows 11, RTX 4080, driver 621.35; 4K output, DLSS Quality preset M (2560x1440 render), HDR Native + PsychoV35, grass 2x, no frame generation, frame rate cap 120 (GPU-bound under it); standing still, the same view each run; the median of the log's vk: N presents, X fps lines over about 45 s after a 30 s warm-up. on: this branch; off: the same build with HOS_SCENE_RGBA16F=0 (main's formats, same caches); main: main at 90fae88c, built the same way.

fps, median (min to max) main @ 90fae88c this PR, switch off this PR
Kakariko Village's entrance 70.6 (68.2 to 71.2) 70.0 (68.1 to 70.7) 69.8 (68.3 to 70.5)
Hyrule Field, the drawbridge 64.2 (62.3 to 64.7) 64.4 (62.4 to 64.8) 64.4 (62.5 to 64.7)

Memory: the R11G11B10F targets double in size while PsychoV35 is on, about 25 MB of video memory at a 1440p render (the scene 15 to 30 MB; its copies and bloom chain the rest). The game's render target heap holds them.

The change, especially with !2414 is enormous ; the banding goes from significantly visible (both bands and color imprecision) to flawless.
Tested on a 4K HDR OLED 12bit

Risks

  • Only with PsychoV35. Native Vanilla, Expanded and SDR keep R11G11B10F and their bands. Fixing them too needs the scene's targets told apart from the game's upscale output (also an R11G11B10F target there), the packed picture's image kept in the old format, and the renderer taking an RGBA16F scene in every mode: a follow-up. Expanded also expands the game's 8-bit SDR picture, whose steps it would keep.
  • Switching the tone mapper in play: the targets follow from the next frame the game makes them (every frame); a frame across the switch could show one wrong frame.
  • Pipelines: the scene's draws now render into RGBA16F, and the shipped pipeline list holds their R11G11B10F pipelines: the first play after updating compiles them in each area (a few hitches), then the player's own list keeps them.
  • The bandwidth of the scene's pass and its bloom doubles: no fps change on an RTX 4080 at 1440p; a GPU with less bandwidth (a handheld) could show one. HOS_SCENE_RGBA16F=0 turns it off; a revert is enough.
  • After updating: nothing changes in saves, longshot_options.ini or the caches.

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). (The checks that read the changed files ran on Linux; the failures there also fail on main or need missing tools. The full run is CI's.)
  • 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.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Built and played on Windows with llvm-mingw; Linux in Still to test.)
  • Screenshots of the same spot on main and here, for a change that shows on screen. (To add: HDR screenshots don't survive a PNG; the dump numbers above stand in.)
  • 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

https://claude.ai/code/session_01VurVAi1MmNDvxaQzPTRZbq

## Summary With **HDR Native + the PsychoV35 tone mapper**, the sky no longer bands: gradients, sunsets and the sun's glow are smooth, with no stripes and no colour fringes between them. **What was wrong.** OoT draws its scene's light (the sky, the world, the clouds, the sun and the fog over it), the copies the refraction reads and the bloom chain into **R11G11B10F** render targets. Red and green keep 6 bits of mantissa and blue 5: each step is 1.6 % / 1.6 % / 3.1 % of the light. In a slow sky gradient that is a few dozen levels across the screen. A raw frame dump of Hyrule Field had **28 levels of blue over the top half of a 1440p sky, in bands about 24 rows tall**, before the tone map. Every output showed them, PsychoV35 included: its tone map already writes RGBA16F (after RenoDX's zelda-oot-oz), but the light it maps was R11G11B10F. The three channels also round on their own grids, so a band's edge has blue rounding one way and green the other: the colour shifts at each step too. **What changes.** While PsychoV35 is on, the host makes the game's R11G11B10F render targets (2D, one level, compressible: what the game's targets are; never a packaged texture) as **RGBX16F** (10 bits of mantissa per channel, alpha read as one as before): - The game makes a frame's render targets in a first-fit heap each frame and asks the host each one's storage size and alignment. The host answers both, the view offset and the texture made from one description (`host/nvn_native.c` `made_desc`, `host/scene_format.h`), so the heap sets the larger targets aside itself. At 2560x1440 the scene goes from 0xf00000 to 0x1e00000 bytes: the size of the RGBA16F target the game itself puts at that address later in the frame. - Only with PsychoV35: with the Vanilla tone map (Native Vanilla, Expanded, SDR) the game packs its square-root picture into the scene's storage through an R32UI view (RGB9E5), which `RX_VK_LOG_R11_VIEWS=1` (new, diag) showed with DLSS, the game's own upscaler and Off; with PsychoV35 those targets are only ever colour. Those modes are unchanged (see Risks). - The renderer takes an R11G11B10F view over such a texture in the texture's own format (`gpu/vk/vk_texture.h` `scene_view_format`), for its views and its pipelines' targets. The temporal upscalers already take an RGBA16F scene under PsychoV35 (`temporal_scene_format`); the log now says `PsychoV35 DLSS: RGBA16F linear route; scene format 97` (was 122). - `HOS_SCENE_RGBA16F=0` (kill switch) keeps R11G11B10F. **With frame generation on**, its frames still go through 8-bit storage in Native HDR and the bands come back: that is #2414's fix. This pull request fixes the light before the tone map; #2414 the frames after it. **Both are needed for a smooth sky with frame generation.** Read first: `host/scene_format.h`, then `made_desc` and its four callers in `host/nvn_native.c`. ## Testing **Tested:** Windows 11, NVIDIA GeForce RTX 4080, driver 621.35, Alienware AW3225QF (12-bit panel), 4K output, DLSS Quality preset M (1440p), grass 2x, no frame generation, built from this branch with the Builder v3.1.1 tools. - HDR Native + PsychoV35, Kakariko Village and Hyrule Field (noon, afternoon, the sun through the clouds): **no banding at all** on the display, no colour fringes. The log: `scene format 97`. - HDR Native + PsychoV35 with AMD FSR 3.1 (on the chain, 1200+ frames) and with the game's own upscaler and Off: no banding either. A run with `RX_VK_LOG_R11_VIEWS=1` through DLSS, FSR 3.1, the game's own and Off logged no R11G11B10F storage seen through another format, no `unexpected scene colour format` and no `PsychoV35 waits`; the targets show in `HOS_NVN_LOG_OBJECTS` as format 0x71 at twice their size (960x540: 0x4b0000). - HDR Native + Vanilla, SDR and Expanded: as on `main` (R11G11B10F, the log's `scene format 122`). - Frame generation 2x (DLSS-FG): the bands come back in every mode, as on `main` (#2414). - Switching the HDR mode and tone mapper in play (PsychoV35, Vanilla, SDR, Expanded, in one session): each mode as described, no corruption. **Image quality** (raw RGBA32F frame dumps, `RX_VK_DUMP_RAW`, Kakariko Village at the same spot, the top 35 % of the screen: the sky; this branch with PsychoV35 against the R11G11B10F scene of the same build; deviation: each pixel against a 15x15 average, in smooth areas): | The scene's light, sky region | R11G11B10F (main) | RGBA16F (this PR) | Improvement | |---|---|---|---| | Distinct levels of blue, after the sky draw | 34 | 1,195 | 35x | | Distinct colours, after the sky draw | 3,016 | 256,895 | 85x | | Distinct colours, after the clouds, sun and fog pass | 15,358 | 295,937 | 19x | | Height of a band (rows of one colour, down a column) | 3.5 | 1.0 | | | Brightness steps: deviation, median / 99th percentile | 0.18 % / 0.61 % | 0.04 % / 0.37 % | 4.7x | | Colour steps (blue / green ratio): deviation, median / 99th percentile | 0.43 % / 1.56 % | 0.03 % / 0.21 % | 13x / 7.6x | | Step of a channel (format) | 1.6 % / 1.6 % / 3.1 % | 0.098 % | 16x / 16x / 32x | The two dumps are frames of the same place a few minutes apart (the clouds move): the counts are what each format can hold there, not a pixel-for-pixel difference. A dither on the two sky programs was tried first and dropped: it broke up the bands but left a coloured grain (each channel rounding on its own grid) that looked worse. **Checks:** `tests/test_scene_format_rgba16f.py` (new: the format rule, both ways and every condition, the sizes against `host/nvn_layout.c`, the wiring in `nvn_native.c`, `vk_texture.*`, `vk_temporal.cpp`, the switch), `tests/test_shadow_slot.py` and `tests/test_pipeline_state_portable.py` (updated for `made_desc` and `scene_view_format`), `test_switch_table`, `test_settings_table`, `test_doc_anchors` pass. `run_all.py --changed main` on Linux: every failure there fails on `main` too (`test_dev_packs`, `test_readback_timeout_source`, `test_target_image_reuse`, `test_vram_compact`, `test_flat_map`, `test_wb_spans`, `test_rdna2_mesh_only`, `test_guest_holes`), or needs a tool that machine lacks (clang++, the Vulkan and SPIR-V headers). **Still to test:** - Linux, AMD (RADV) and Intel: PsychoV35, Hyrule Field's sky, the log's `scene format 97` (@Beanstalk) - FSR 4 (AMD) and XeSS (no `libxess.dll` here) with PsychoV35: the sky smooth, no `unexpected scene colour format` in the log (@Beanstalk, or by hand) ## Measurements **Verdict:** within the spread: no cost measured. Setup: Windows 11, RTX 4080, driver 621.35; 4K output, DLSS Quality preset M (2560x1440 render), HDR Native + PsychoV35, grass 2x, no frame generation, frame rate cap 120 (GPU-bound under it); standing still, the same view each run; the median of the log's `vk: N presents, X fps` lines over about 45 s after a 30 s warm-up. *on*: this branch; *off*: the same build with `HOS_SCENE_RGBA16F=0` (main's formats, same caches); *main*: main at 90fae88c, built the same way. | fps, median (min to max) | main @ 90fae88c | this PR, switch off | this PR | |---|---|---|---| | Kakariko Village's entrance | 70.6 (68.2 to 71.2) | 70.0 (68.1 to 70.7) | 69.8 (68.3 to 70.5) | | Hyrule Field, the drawbridge | 64.2 (62.3 to 64.7) | 64.4 (62.4 to 64.8) | 64.4 (62.5 to 64.7) | Memory: the R11G11B10F targets double in size while PsychoV35 is on, about 25 MB of video memory at a 1440p render (the scene 15 to 30 MB; its copies and bloom chain the rest). The game's render target heap holds them. The change, especially with !2414 is enormous ; the banding goes from significantly visible (both bands and color imprecision) to flawless. Tested on a 4K HDR OLED 12bit ## Risks - **Only with PsychoV35.** Native Vanilla, Expanded and SDR keep R11G11B10F and their bands. Fixing them too needs the scene's targets told apart from the game's upscale output (also an R11G11B10F target there), the packed picture's image kept in the old format, and the renderer taking an RGBA16F scene in every mode: a follow-up. Expanded also expands the game's 8-bit SDR picture, whose steps it would keep. - **Switching the tone mapper in play**: the targets follow from the next frame the game makes them (every frame); a frame across the switch could show one wrong frame. - **Pipelines**: the scene's draws now render into RGBA16F, and the shipped pipeline list holds their R11G11B10F pipelines: the first play after updating compiles them in each area (a few hitches), then the player's own list keeps them. - **The bandwidth** of the scene's pass and its bloom doubles: no fps change on an RTX 4080 at 1440p; a GPU with less bandwidth (a handheld) could show one. `HOS_SCENE_RGBA16F=0` turns it off; a revert is enough. - After updating: nothing changes in saves, `longshot_options.ini` or the caches. ## 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. - [ ] `mise run test` passes (any failure that also fails on `main` is named). (The checks that read the changed files ran on Linux; the failures there also fail on `main` or need missing tools. The full run is CI's.) - [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. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. (Built and played on Windows with llvm-mingw; Linux in Still to test.) - [ ] Screenshots of the same spot on `main` and here, for a change that shows on screen. (To add: HDR screenshots don't survive a PNG; the dump numbers above stand in.) - [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) https://claude.ai/code/session_01VurVAi1MmNDvxaQzPTRZbq
fix(vk): no sky banding with Native HDR's PsychoV35: the scene's render targets in RGBA16F
Some checks failed
CI / Website build and checks (pull_request) Blocked by required conditions
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Failing after 18s
09ccbd4253
OoT draws its scene's light (the sky, the world, the clouds, the sun and the fog), its copies and its bloom into R11G11B10F
render targets: 6/6/5 bits of mantissa, steps of 1.6 % / 1.6 % / 3.1 % of the light, and the sky came out in bands (28 levels
of blue over the top half of a 1440p Hyrule Field sky, bands of 24 rows). With PsychoV35 (hos_scene_rgba16f) the game uses
those targets only as colour, so the host makes them RGBX16F (host/scene_format.h): the storage size, alignment and view offset
its per-frame render target heap asks, and the texture made, from one description (nvn_native.c made_desc). The renderer
takes an R11G11B10F view over such a texture in the texture's format (vk_texture.h scene_view_format). HOS_SCENE_RGBA16F=0
keeps R11G11B10F. RX_VK_LOG_R11_VIEWS (diag) logs an R11G11B10F storage seen through another format: how the Vanilla tone
map's packed picture was found.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VurVAi1MmNDvxaQzPTRZbq
Member
@review
BeanBot left a comment

Recommendation: Request changes. The higher-precision scene removes the reported banding on the tested NVIDIA system, but the default needs validation on the other affected systems.

PsychoV35 scene targets use higher precision, producing smoother sky gradients. The cost is larger render targets and additional bandwidth; the reported 1440p render uses about 25 MB more video memory.

Blocking (1): must change before merging.

  1. L4: The check PR description / Description follows the template (pull_request_target) fails on this head and passes on the base branch: Failing after 18s.

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

  • L1 tests/test_scene_format_rgba16f.py:120: The test treats the entire compiler setting as one executable name, although the test runner accepts CC settings containing compiler arguments. (more on the line) Do: Parse the compiler command into arguments as the runner does and prepend those arguments to the compilation command.

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

  • L2 host/scene_format.h:37: The new default doubles scene-target storage and bandwidth on all supported Vulkan systems, but its compatibility and cost are only reported on an RTX 4080. (more on the line) Do: Run the same scene with the switch on and off on Steam Deck and representative Windows and Linux AMD systems, recording FPS, frame-time lows and VRAM, and verify the sky and upscaler output.
  • L3 gpu/vk/vk_texture.h:195: The wider scene path has not been exercised with FSR 4 or XeSS, or on Intel and Linux NVIDIA as applicable. (more on the line) Do: Run PsychoV35 with FSR 4 and XeSS on supported hardware, and verify the sky and absence of format errors on the remaining affected systems.

@fix can do L1 and L4.

Questions (3) (not confirmed from the code; they don't hold the recommendation)

  • host/nvn_native.c:654: Can a present that changes the tone mapper occur between the size query and initialization of the same scene texture?
  • host/nvn_native.c:649: Can a guest thread create textures concurrently with the guest thread presenting a frame?
  • host/nvn_native.c:652: Can two guest threads call a texture-builder operation that reaches made_desc concurrently before its first initialization completes?

Checks: Still running: 10 checks.

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

Does it help: Yes for the reported visual defect on Windows and an RTX 4080: the author reports no visible banding, and sky blue levels increased from 34 to 1,195 in frame dumps. The reported median FPS was within the run spread, but frame-time lows and the cost on lower-bandwidth hardware are not measured.

Other systems: The format change affects render targets and temporal upscalers across Vulkan devices. Windows NVIDIA was tested with DLSS, FSR 3.1, the game upscaler and Off; Linux, RADV, Intel, FSR 4, XeSS and Steam Deck remain untested. Vanilla, SDR and Expanded were reported unchanged.

Switches: HOS_SCENE_RGBA16F is a kill switch, on by default; its visual benefit is shown on NVIDIA, but its cost and compatibility on other affected systems remain unmeasured. RX_VK_LOG_R11_VIEWS is a diagnostic switch, off by default, which is appropriate.

Reviewed: 09ccbd4253 against 90fae88c13: Read the repository contribution rules, standards, PR template, complete diff, commit message, new header and test, and the changed tests. Read the changed host and renderer functions and relevant callers and format handling; the large host and renderer files were not read in full. The neighboring Tooling AGENTS.md and docs/review-checklist.md were not present. No recorded runs, translations or generated files were changed.; nothing run (a code review).

Checked and fine:

  • The commit records AI assistance.
  • Both new switches have entries in switches.def.
  • RGBX16F sampled views force alpha to one.
  • No game-derived files, generated shader files, API version changes or third-party edits appear in the diff.

Testing: Read-only review; no code, tests or project scripts were run. The PR reports successful Windows game runs and source checks; CI still has checks running.

Overlaps and merge order: Not checked; the network is closed.


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

**Recommendation: Request changes.** The higher-precision scene removes the reported banding on the tested NVIDIA system, but the default needs validation on the other affected systems. PsychoV35 scene targets use higher precision, producing smoother sky gradients. The cost is larger render targets and additional bandwidth; the reported 1440p render uses about 25 MB more video memory. **Blocking (1)**: must change before merging. 1. **L4**: The check `PR description / Description follows the template (pull_request_target)` fails on this head and passes on the base branch: Failing after 18s. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `tests/test_scene_format_rgba16f.py:120`: The test treats the entire compiler setting as one executable name, although the test runner accepts CC settings containing compiler arguments. (more on the line) **Do:** Parse the compiler command into arguments as the runner does and prepend those arguments to the compilation command. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `host/scene_format.h:37`: The new default doubles scene-target storage and bandwidth on all supported Vulkan systems, but its compatibility and cost are only reported on an RTX 4080. (more on the line) **Do:** Run the same scene with the switch on and off on Steam Deck and representative Windows and Linux AMD systems, recording FPS, frame-time lows and VRAM, and verify the sky and upscaler output. - **L3** `gpu/vk/vk_texture.h:195`: The wider scene path has not been exercised with FSR 4 or XeSS, or on Intel and Linux NVIDIA as applicable. (more on the line) **Do:** Run PsychoV35 with FSR 4 and XeSS on supported hardware, and verify the sky and absence of format errors on the remaining affected systems. `@fix` can do L1 and L4. **Questions (3)** (not confirmed from the code; they don't hold the recommendation) - `host/nvn_native.c:654`: Can a present that changes the tone mapper occur between the size query and initialization of the same scene texture? - `host/nvn_native.c:649`: Can a guest thread create textures concurrently with the guest thread presenting a frame? - `host/nvn_native.c:652`: Can two guest threads call a texture-builder operation that reaches made_desc concurrently before its first initialization completes? **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the reported visual defect on Windows and an RTX 4080: the author reports no visible banding, and sky blue levels increased from 34 to 1,195 in frame dumps. The reported median FPS was within the run spread, but frame-time lows and the cost on lower-bandwidth hardware are not measured. **Other systems:** The format change affects render targets and temporal upscalers across Vulkan devices. Windows NVIDIA was tested with DLSS, FSR 3.1, the game upscaler and Off; Linux, RADV, Intel, FSR 4, XeSS and Steam Deck remain untested. Vanilla, SDR and Expanded were reported unchanged. **Switches:** HOS_SCENE_RGBA16F is a kill switch, on by default; its visual benefit is shown on NVIDIA, but its cost and compatibility on other affected systems remain unmeasured. RX_VK_LOG_R11_VIEWS is a diagnostic switch, off by default, which is appropriate. **Reviewed:** 09ccbd4253d0 against 90fae88c1396: Read the repository contribution rules, standards, PR template, complete diff, commit message, new header and test, and the changed tests. Read the changed host and renderer functions and relevant callers and format handling; the large host and renderer files were not read in full. The neighboring Tooling AGENTS.md and docs/review-checklist.md were not present. No recorded runs, translations or generated files were changed.; nothing run (a code review). **Checked and fine:** - The commit records AI assistance. - Both new switches have entries in switches.def. - RGBX16F sampled views force alpha to one. - No game-derived files, generated shader files, API version changes or third-party edits appear in the diff. **Testing:** Read-only review; no code, tests or project scripts were run. The PR reports successful Windows game runs and source checks; CI still has checks running. **Overlaps and merge order:** Not checked; the network is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -192,0 +192,4 @@
/// (longshot) A view's NVN format over a texture of NVN format tex_nvn: R11G11B10F over one of the game's R11G11B10F targets that
/// the host made RGBX16F (host/scene_format.h: the scene's light with PsychoV35) is the texture's own, the format it holds; any
/// other as it is
inline int scene_view_format(int tex_nvn, int view_nvn) {
Member

L3 (should fix): The wider scene path has not been exercised with FSR 4 or XeSS, or on Intel and Linux NVIDIA as applicable.

When: Those upscalers and drivers receive the changed scene format under PsychoV35, but the reported runs cover neither their output nor their handling of that format.

Do: Run PsychoV35 with FSR 4 and XeSS on supported hardware, and verify the sky and absence of format errors on the remaining affected systems.

**L3** (should fix): The wider scene path has not been exercised with FSR 4 or XeSS, or on Intel and Linux NVIDIA as applicable. *When:* Those upscalers and drivers receive the changed scene format under PsychoV35, but the reported runs cover neither their output nor their handling of that format. **Do:** Run PsychoV35 with FSR 4 and XeSS on supported hardware, and verify the sky and absence of format errors on the remaining affected systems.
@ -0,0 +34,4 @@
if (!on || format != HOS_SCENE_FORMAT_R11G11B10F || target != HOS_SCENE_FORMAT_TARGET_2D || flags != HOS_SCENE_FORMAT_FLAGS ||
samples > 1 || levels != 1 || depth > 1 || packaged)
return format;
return HOS_SCENE_FORMAT_RGBX16F;
Member

L2 (should fix): The new default doubles scene-target storage and bandwidth on all supported Vulkan systems, but its compatibility and cost are only reported on an RTX 4080.

When: A Steam Deck or RADV system using PsychoV35 executes the wider scene and bloom passes; the NVIDIA median FPS results do not establish its frame pacing or available memory on that system.

Do: Run the same scene with the switch on and off on Steam Deck and representative Windows and Linux AMD systems, recording FPS, frame-time lows and VRAM, and verify the sky and upscaler output.

**L2** (should fix): The new default doubles scene-target storage and bandwidth on all supported Vulkan systems, but its compatibility and cost are only reported on an RTX 4080. *When:* A Steam Deck or RADV system using PsychoV35 executes the wider scene and bloom passes; the NVIDIA median FPS results do not establish its frame pacing or available memory on that system. **Do:** Run the same scene with the switch on and off on Steam Deck and representative Windows and Linux AMD systems, recording FPS, frame-time lows and VRAM, and verify the sky and upscaler output.
@ -0,0 +117,4 @@
exe = Path(tmp) / "t.exe"
src.write_text(FIXTURE.replace('"../gpu/render/rx_nvn.h"', '"%s"' % (ROOT / "gpu" / "render" / "rx_nvn.h").as_posix()),
encoding="utf-8")
subprocess.run([a.cc, "-std=c11", "-Wall", "-Wextra", "-Werror", "-I", str(ROOT / "host"), str(src),
Member

L1 (should fix): The test treats the entire compiler setting as one executable name, although the test runner accepts CC settings containing compiler arguments.

When: With CC set to a valid command such as "ccache gcc", run_all recognizes the compiler and passes that string as --cc, but subprocess tries to execute a file literally named "ccache gcc" and the check fails.

Do: Parse the compiler command into arguments as the runner does and prepend those arguments to the compilation command.

**L1** (should fix): The test treats the entire compiler setting as one executable name, although the test runner accepts CC settings containing compiler arguments. *When:* With CC set to a valid command such as "ccache gcc", run_all recognizes the compiler and passes that string as --cc, but subprocess tries to execute a file literally named "ccache gcc" and the check fails. **Do:** Parse the compiler command into arguments as the runner does and prepend those arguments to the compilation command.
Some checks failed
CI / Website build and checks (pull_request) Blocked by required conditions
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Failing after 18s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
Some workflows are waiting to be reviewed.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'fix/sky-banding:Heliumrich-fix/sky-banding'
git switch 'Heliumrich-fix/sky-banding'
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!2424
No description provided.