fix(vk): scale volumetric fog from each area's palette #3241
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3241
Loading…
Reference in a new issue
No description provided.
Delete branch "erlo68/Longshot:feat/fog-percentages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
In the same spot in Hyrule Field, switching from Game’s to Less close Fog could make the scene noticeably foggier. Restarting with the preset selected could reproduce it. The preset's
3.0set a fixed scattering target for every ground fog palette. An area with low authored scattering could be pushed up to that target. This follows up on the original Volumetric Fog PR #2423.Less close Fog now sets Ground Scattering strength to
300%of each palette's authored values and uses Game’s for the other controls. The renderer scales Mie and Rayleigh together, preserving their balance. The preset uses the same relative adjustment across areas and after restarting, so a fixed target can no longer override a palette's baseline.Custom Scattering strength and Emission attenuation now use
0–500%in 10-percentage-point steps. At100%each palette renders with its authored value. Global profiles reuse the same percentages across areas. Absorption keeps its existing absolute scale.Existing absolute Custom overrides keep their previous appearance after updating. The menu shows Previous value for those sliders. Editing one replaces that override in the active profile with a percentage. Resetting the layer returns it to Game’s. The renderer math is in
gpu/vk/settings/fog_settings.h.game/crates/longshot-game/src/fog_profiles.rsandsettings_now.rshandle saved profiles.Testing
Tested: Windows 11 with Radeon RX 7900 XT and AMD Vulkan 26.11.2 (LLPC). In Hyrule Field, switched between Game’s, Less close Fog and Custom, and verified that an edited Custom slider saved the new percentage. The rebased renderer build also started and reached gameplay in Kokiri Forest. The fog regression fails with main's renderer and passes with the new implementation. The saved-profile compatibility and settings-key checks pass.
With LLVM-MinGW, the full Windows
mise run testsuite and retries ended with 845 passed, 14 failed, 52 skipped on both main (7bc53f84) and this PR (6bb231b4). Every final failure also occurred on main. The retries used the builder's compiler aliases and pinned glslang. The Windows control-bridge test passed on retry after an initial file-lock error.14 checks that also failed on main
tests/test_dev_update.pytests/test_dlssg.pytests/test_fsr4_tune.py(requiresspirv-val)tests/test_lifter.py(requiresllvm-mc)tests/test_no_game_title.pytests/test_no_map_reload.pytests/test_parity_gates.pytests/test_present_acquire_ahead.pytests/test_present_geometry_trace.pytests/test_present_held_image.pytests/test_present_image_free.pytests/test_sync_watch_event.pytests/test_turf_budget.pytests/test_ui_renderer.pyStill to test:
Measurements
This changes fog coefficients and saved-setting compatibility. The regression checks the coefficients directly.
Risks
The named preset can look different after the update because its scattering follows the active palette. Game’s restores the authored fog. Existing Custom values retain their old rendering until the corresponding control is edited or reset. The compatibility check covers per-area and global profiles.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.tests/that reads changed source is updated, not weakened.mainand here, for a change that shows on screen.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.Tested in game: Windows 11, Radeon RX 7900 XT, AMD Vulkan 26.11.2 (LLPC). Switched between Game's, Less close Fog and Custom in Hyrule Field and verified the edited Custom percentage persisted. The rebased renderer also launched into Kokiri Forest gameplay.
Possibly related, for context:
WIP: fix(vk): scale volumetric fog from each area's paletteto fix(vk): scale volumetric fog from each area's palette@rebase
I rebased this pull request onto
main(b6330a5b0b): the new head is6131e1a7bf.Conflicts resolved
Nothing was built or run: read the resolution before merging.
Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
6bb231b4a86131e1a7bfRecommendation: Request changes. Existing Custom profiles retain their old fog overrides, but the menu shows those overrides as Game’s, so players cannot tell that the authored fog is not active. The changed renderer also still needs the stated Linux and Tier 1 hardware coverage.
The preset scales ground scattering from each palette, and Custom scattering and emission controls become percentages while retaining old absolute overrides. This removes the fixed target’s ability to increase scattering on low-scattering palettes, at the cost of migration and menu complexity.
Blocking (1): must change before merging.
game/mods/fog/mod.toml:131: The fog slider does not display this Previous value text: its custom menu rendering always draws Game’s for the default position. (more on the line) Do: Make the fog slider render the evaluated value text for the previous-value state, and add a menu test that loads an old override and checks the displayed label.Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/settings/fog_settings.h:446: The new palette-relative rendering has not yet been verified across the supported Tier 1 systems and transitions. (more on the line) Do: Run the preset and saved-profile startup and area-transition checks on the remaining affected Tier 1 platforms, including Linux and Steam Deck, and compare matching in-game views against main.@fixcan do L1.Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes for the coefficient-level regression: the PR reports a game-free check that fails on main and passes here, and a Windows RX 7900 XT game run. Matching visual comparisons and the remaining startup and area-transition runs are still outstanding.
Other systems: The changes affect both fog layers, global and per-area profiles, startup, area transitions, Windows and Linux Vulkan, and all GPU vendors. The author reports a Windows AMD run; Linux, NVIDIA and Steam Deck coverage is still needed.
Switches: No environment switches added, changed or removed. The player-facing scattering and emission controls change to 0–500%, defaulting to Game’s; Less close Fog now uses 300% ground scattering.
Reviewed:
6131e1a7bfagainstb6330a5b0b: Read the repository rules, PR template, standards, commit messages, core fog profile and renderer changes, and the surrounding settings and menu paths. Skimmed the translation diffs, generated ABI changes, and portions of the larger settings, menu and test files; docs/review-checklist.md and the adjacent Tooling checkout were absent.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no tests or project code were run. The PR reports Windows game testing and game-free checks; CI is still running.
Overlaps and merge order: Not checked; the network is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.
@ -132,2 +130,2 @@max = 50default = -1help = "Percentage of the area's original value. 100% matches Game's."textWhen = [{ when = "value < 0 && fog_ground_scattering >= 0", text = "Previous value" }]L1 (blocking): The fog slider does not display this Previous value text: its custom menu rendering always draws Game’s for the default position.
When: After loading an old Custom profile with an absolute scattering or emission override, the renderer preserves that override while the corresponding percentage remains at its default. The menu’s fog slider branch in rows.tsx ignores the row’s textWhen result and displays Game’s, falsely indicating that the authored value is active; this affects all four migrated sliders.
Do: Make the fog slider render the evaluated value text for the previous-value state, and add a menu test that loads an old override and checks the displayed label.
@ -429,3 +444,3 @@Profiles result{defaults, defaults};switch (preset) {case less_close_fog_preset: result[ground][mie] = 30; break;case less_close_fog_preset: result[ground][mie] = less_close_scattering_percent; break;L2 (should fix): The new palette-relative rendering has not yet been verified across the supported Tier 1 systems and transitions.
When: The reported in-game run covers Windows on one AMD GPU. Linux Vulkan, NVIDIA and Steam Deck runs have not shown that the preset and saved Custom values apply correctly at startup and after an area transition.
Do: Run the preset and saved-profile startup and area-transition checks on the remaining affected Tier 1 platforms, including Linux and Steam Deck, and compare matching in-game views against main.
@fix
6131e1a7bf0d104f6efbRecommendation: Approve. The code is ready: only testing is left. The palette-relative fog fix has been exercised on Windows with an AMD GPU, but the remaining Tier 1 visual and area-transition checks are still needed. The pull request is also reported as not mergeable. Recommend approval; not approved on the forge.
What
@fixchangedI changed this pull request: the new head is
0d104f6efb. I rebased it ontomain(e13b792f1a).Conflicts resolved
Changed
Nothing was built or run: the checks run again on the new head.
Less close Fog scales each area's authored scattering instead of applying a fixed target, and existing Custom overrides retain their appearance. The fix also makes legacy override labels visible; it adds settings-fact evaluation and refresh work to the menu.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/settings/fog_settings.h:446: The new palette-relative rendering has not yet been verified across the supported Tier 1 systems and transitions. When: The reported in-game run covers Windows on one AMD GPU. Linux Vulkan, NVIDIA and Steam Deck runs have not shown that the preset and saved Custom values apply correctly at startup and after an area transition. Do: Run the preset and saved-profile startup and area-transition checks on the remaining affected Tier 1 platforms, including Linux and Steam Deck, and compare matching in-game views against main.Checks: they run again on this head; a failure shows on the pull request.
Also noticed (3; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven across supported systems. The author reports the regression test passes and the presets work in Hyrule Field on Windows with an RX 7900 XT; matching views, legacy-profile startup behavior, Linux and other Tier 1 runs remain unreported.
Other systems: The renderer and saved profiles affect Windows and Linux, GPU vendors, area transitions and global as well as per-area settings. The reported in-game run covers Windows and AMD; the remaining coverage is tracked by L2.
Switches: No developer switches added, changed or removed. The Custom scattering and emission controls now default to Game's and accept 0–500%; existing absolute overrides are retained until edited or reset.
Reviewed:
0d104f6efbagainste13b792f1a: Read AGENTS.md, CONTRIBUTING.md, the pull request template, the fix diff, fog profile code, relevant settings-host and dependency code, and the fog renderer and manifest diffs. Skimmed the base-to-head file list, commits and reported runs; the full set of changed files and their callers was not read.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run tests were executed. The author reports Windows gameplay and game-free checks; CI has not run on this head.
Overlaps and merge order: The base-to-head history includes fullscreen PR #3247 and MAKO scaler PR #3211; their merge order relative to this pull request is not established.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@rebase
I rebased this pull request onto
main(bd4586c2e3): the new head is9b4e965db7.Conflicts resolved
Nothing was built or run: read the resolution before merging.
Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
0d104f6efb9b4e965db7Recommendation: Approve. The code is ready: only testing is left. The reported Windows run exercises the preset and a saved percentage, but Tier 1 visual verification and Linux startup and area-transition testing remain outstanding. CI is also still running. Recommend approval; not approved on the forge.
The preset scales scattering from each area's authored palette, and custom scattering and emission use percentages while retaining legacy absolute overrides. This addresses the fixed-target behavior at the cost of saved-profile compatibility logic.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/settings/fog_settings.h:446: The new palette-relative rendering has not yet been verified across the supported Tier 1 systems and transitions. When: The reported in-game run covers Windows on one AMD GPU. Linux Vulkan, NVIDIA and Steam Deck runs have not shown that the preset and saved Custom values apply correctly at startup and after an area transition. Do: Run the preset and saved-profile startup and area-transition checks on the remaining affected Tier 1 platforms, including Linux and Steam Deck, and compare matching in-game views against main.Since the last review (on
0d104f6efb)Still open: L2 (The new palette-relative rendering has not yet been verified across the supported Tier 1 s…)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven: the author reports a passing coefficient regression and an in-game Windows check, but matching before-and-after views and the remaining platform runs have not been reported.
Other systems: The renderer change affects Vulkan fog on Windows and Linux, across GPU vendors and area transitions. The reported in-game run covers Windows on an AMD Radeon RX 7900 XT; Linux and remaining Tier 1 coverage are outstanding.
Switches: No environment variables or developer switches added. Custom scattering and emission controls now default to Game's and offer 0–500% in 10-point steps; 100% preserves authored values. Less close Fog uses 300% ground scattering.
Reviewed:
9b4e965db7againstbd4586c2e3: Read AGENTS.md, CONTRIBUTING.md, the rebased ABI diffs, and the fog renderer and saved-profile diffs. Skimmed the file list and commit history; did not read all changed files in full, translations, generated files, the pull request template, or all referenced project rules.; nothing run (a code review).Checked and fine:
Testing: No commands that build or run project code were executed. The author reports Windows in-game testing and game-free checks; CI remains in progress.
Overlaps and merge order: Not checked.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.