WIP: feat(dlss): compose neural rendering over native HDR #620
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!620
Loading…
Reference in a new issue
No description provided.
Delete branch "TheDevil/Longshot:feat/nr-native-hdr-scale"
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?
Type: feat · Risk: high · Tested on: Windows NGX-on/off renderer builds and game-free fixtures · Needs: fresh HDR display/runtime measurements and Linux validation
Why
Preserve Native HDR highlights when using optional NR, and allow its neural-pass cost to be adjusted independently of render/output resolution. This is the HDR/scaling follow-up to #619, split from #173.
What changed
NR sees a bounded scene proxy. Its model edits are composed as a residual onto the original linear HDR scene, preserving highlights instead of routing the entire output through an SDR clamp. Identity NR output is a no-op before half-float rounding. Native HDR routes after the upscaler once per frame. SDR Stage supports Before/After; frame snapshots prevent a menu edit from evaluating twice. NR resolution scale resamples scene/depth/motion and composes back to original output dimensions.
This is stacked on #619; review child
e3464f4ceeagainst parentd6a6ba9915. The upstream diff includes its parent until #619 lands. API remains 22. No keyboard, wheel or cap change. No patched-runtime bridge, alternate runtime loader or new application ID.Underlying NR work is credited to HypeZ85 / Discord valerio85, Hookshot PR #1590, a1f730de8c8e7b2adfbca4e0b8ac4cfbdf72834c.
Measurements
Verdict: HDR/scaling renderer links and game-free adapter/menu/shader checks pass. CPU fixtures and shader compilation do not establish HDR display correctness or a GPU performance improvement.
Before: #619 @
95126d5729After:
e3464f4ceeHardware: Windows x64, i7-14700F, 16 GB; GPU/driver/display not exercised.
Scene: authored frame/NGX fixtures and shader compilation, no gameplay rendered.
Method: production adapter extracted with fake Vulkan/NGX, original shader compilation and SPIR-V correspondence, full regression suite.
How to reproduce:
python -I -B tests/run_all.py --jobs 5; renderer-onlyRX_VK_ONLY=1 python -I -B nx2/build.py --standalone --jobs 4with NGX SDK configured.Full suite at refreshed head: 542 passed, 13 failed, 35 skipped (201 s). All failures also fail on main @
2b1d38c6:tests/test_appimage_player_build.py,tests/test_cpm_discovery.py,tests/test_crash_dialog.py,tests/test_env_on.py,tests/test_lift_cleanup_error.py,tests/test_linux_preflight.py,tests/test_make_game_cache.py,tests/test_oot_state_tap.py,tests/test_readback_late.py,tests/test_tested_configurations.py,tests/test_vk_pgo.py,tests/test_vram_budget_row.py,tests/test_walk_key.py. Main had 530 passed, 14 failed, 34 skipped; test_finish_output passed in this run. No new failing checks.Baseline: #619 is the comparison because this change depends on its regular NGX port.
95126d57e3464f4cFlags and settings
NR stays off by default (
dlss5=0). NR resolution scale defaults to 100%; it affects only the neural pass, independently of DLSS quality/render/output settings. SDR Stage defaults to Before; Native HDR forces After. Optional ini keysdlss5_scaleanddlss5_stagepersist through Compare Save/Cancel. No additional environment switches. Parent NR requirements/overrides remain as documented in docs/dlss5-neural-rendering.md.Testing
Tested: Windows renderer link, stage routing/one evaluation per frame, stale UI HDR flag versus actual frame mode, HDR proxy/composition selection, scaled before/after dimensions, invalid inputs, repeated failure fallback, model/menu transaction tests and source/SPIR-V correspondence.
Not tested: fresh game with a compatible unmodified NR runtime, HDR display/capture quality, GPU time/VRAM, physical resize/device changes, Linux host/renderer/runtime. Installed game untouched. Earlier combined patched-runtime results are not evidence for this source split.
Must be tested:
Risks
Proxy/residual composition may alter saturation, highlight detail, temporal stability or half-float precision with some models. Scaling may reduce detail or introduce resampling artifacts; measurement is required to choose a useful scale. Disable NR to retain ordinary rendering; reverting this child restores the SDR-only parent.
Compatibility: API/save/cache formats unchanged. New optional keys default to existing full-size Before behavior for SDR. Native HDR now uses a separate pass; host and base NR prerequisites remain unchanged. No vendor runtime or game assets included; checked-in SPIR-V headers are source companions.
Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Upstream refresh
Current head
e3464f4cee34dd73d4ae55f048cdc71f26253e33incorporates main snapshot6c9edffethrough the refreshed NR parentd6a6ba99152333a189def02c126105c74a01dd7c, with published history preserved. Final full run: 542 passed, 13 baseline failures, 35 skipped in 201 seconds. No new failures. The added upstream Linux pipe-security check is skipped on Windows. The literal rebase checkbox remains pending because main was merged, not rewritten. Fresh game/unmodified-runtime/HDR-display/Linux validation remains WIP.Refreshed onto main snapshot
6c9edffethrough parent #619 without rewriting history. Final heade3464f4cee: 542 passed, 13 baseline failures, 35 skipped in the full Windows game-free suite (201 s). NGX-on/off renderer builds succeeded; production renderer source is unchanged by the upstream merge. Fresh HDR display/unmodified-runtime/Linux validation remains pending; still WIP.This pull request builds on #619 and conflicts with
mainthrough it. Could you rebase it once #619 has landed or been rebased? Thank you.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.