WIP: feat(vk): PsychoV35 as RenoDX's zelda-oot-oz has it: its settings, its scene and its HDR output #1393
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!1393
Loading…
Reference in a new issue
No description provided.
Delete branch "LRF17/Longshot:psychov35-look"
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: medium · Tested on: Windows 11, RTX 4090 (driver 610.47) · Needs: Linux; AMD and Intel GPUs
Why
With the HDR tone mapper on PsychoV35, the picture is RenoDX's zelda-oot-oz mod at its defaults, and not quite even
that: none of the mod's settings can be changed, the scene still differs from the mod's (its warm torch and lantern
light is missing), the UI is drawn at the paper white and is far too bright (#843), and the picture goes out through
the game's own encoder matrix where the mod uses BT.709. Players who use the mod elsewhere notice all four.
What changed
PsychoV35 now matches the mod: its settings in the menu, read live; its scene; and its HDR output with a colour space
choice and a UI brightness of its own. Everything is found in the translated IR (nothing of the game's code is kept),
and the settings reach the programs through a constant bank the renderer owns, read at each draw, so a change shows at
once with nothing translated again.
ir_opt/psychov35.htakesSettings(test35.hlsl's grading of the neutral level and the cones;Defaultsare the mod's);ir_opt/scene_tonemap_pass.hreads them withGetFloatCbuffrom bankPsychoV35::kSettingsBank(19) and adds it to the program's constant buffers;shader_info.hMAX_CBUFS18 -> 20;vk_draw.cppuniform_rangefills bank 19 frompsychov35_bank(vk_menu.cpp).vk_menu.cppthe mod's rows under HDR, in its order, as sliders, shown with Native HDR and PsychoV35, and"PsychoV35 reset all"; the HDR contrast row hidden with PsychoV35 (its own Contrast grades the scene), and
vk_framegen.cppno longer grades the picture a second time.left out and its blue times the exposure once more (the mod's native gain (g, g, g*g)); the bloom term scaled by
Bloom; the peak the HDR peak over the paper white; the scene in the UI's white.
ir_opt/output_encode_pass.h, as the mod's output_0x92D6F81D: the game's HDR10 encoder, found byPQ's constants and its 1e-4 in its code (
vk_shader.cppCode::pq_fit) and keyed with PsychoV35's programs, writesthe chosen colour space's BT.2020 light (Vanilla: the game's matrix over its white; BT.709 and DCI-P3: RenoDX's
matrices) times the UI's white, then PQ.
Measurements
Verdict: no measurable cost: the GPU time a frame is the same as main's within the log's 0.1 ms, PsychoV35 on and off, and the fps too.
Baseline: measured together with #1394 on top (
6ee92f93), which contains this one: the pair costs nothing measurable, so neither does this one.Hardware: Windows 11 Pro, RTX 4090 (driver 610.47), 64 GB RAM, 16 threads; the picture streamed at 120 Hz while measured
Scene: Hyrule Castle Town at night, child Link standing still in front of the stables; 3840x2160, Native HDR, DLSS Quality (2560x1440, preset K), frame generation off, frame rate uncapped, V-Sync off
Method: the GPU time a frame from
longshot_log.txt(vk: GPU time ... ms a frame, every 120 presents): the median of the last ~60 lines of 2 minutes standing still; runs interleaved (main, this PR, main, this PR) after a warm-up run of each, the same build toolchain (v3.0.0-rc.7) for both sides and the options pinned withHOS_OPTIONS_FILE; fps alongside, bound by the stream's presentation (~91)How to reproduce: a save in Castle Town at night; the settings above; each run 2 minutes standing still once in place
544229a26ee92f93Flags and settings
Thirteen menu rows (README's option table), all shown only with Native HDR and the PsychoV35 tone mapper; no switch.
Testing
Tested:
python -I -B tests/run_all.pyon Windows 11: the same 68 failures as onmain @ 544229a2, all ofthem environment ones (listed below), nothing new.
tests/test_psychov35.pycompares the headerwith RenoDX's path on 5518 colours and gradings;
tests/scene_tonemap_ir.cppchecks the bank, the adapted gain, thebloom and the scene's scale;
tests/output_encode_ir.cppchecks the encoder against RenoDX's in double, in each colourspace and three UI whites. In the game (RTX 4090, Windows 11, Native HDR, PsychoV35, DLSS), side by side with the mod
(ReShade, zelda-oot-oz at its defaults): every row changes the picture at once and "reset all" brings the defaults
back; Hyrule Castle Town at night, the same warm torch and lantern light, the same bloom, the same colours in each
colour space and the same UI brightness as the mod; Lon Lon Ranch alley, child Link, the camera moved back and forth:
no warm/cool or brightness jump (#344's place). Contrast at 0 gives a broken picture, as the mod's does (test35.hlsl
divides the purity by the contrast); left as the mod has it.
The 68 checks that fail on main @
544229a2and here alike (this PC's environment: a compiler name it lacks, a CRLF checkout, tools not installed)nx2/test_mesh_first_types.py,tests/test_alt_enter.py,tests/test_audio_deadline.py,tests/test_audio_output_errors.py,tests/test_audio_wave_buffer_release.py,tests/test_bc_levels.py,tests/test_bind_memo.py,tests/test_capture_copy_helpers.py,tests/test_collect_wide.py,tests/test_cpu_report.py,tests/test_dlss_actor.py,tests/test_dlss_checks.py,tests/test_dlss_math.py,tests/test_draw_binds.py,tests/test_env_file.py,tests/test_failed_compile_keeps_objects.py,tests/test_finish_output.py,tests/test_fps_overlay_order.py,tests/test_fps_rate.py,tests/test_fps_stats.py,tests/test_framegen_auto.py,tests/test_framegen_gate.py,tests/test_fsr3_math.py,tests/test_gpu_choice.py,tests/test_hd_rumble.py,tests/test_import_span.py,tests/test_job_queue.py,tests/test_jobs_wait_runs_queued.py,tests/test_menu_mouse_scroll.py,tests/test_mirror_inherit.py,tests/test_missing_nup.py,tests/test_movie_upscale_policy.py,tests/test_nvn_texture_handle.py,tests/test_oot_jitter.py,tests/test_pass_hazard.py,tests/test_pool_span.py,tests/test_present_ahead.py,tests/test_present_thread.py,tests/test_prof_clock.py,tests/test_profiling_mode.py,tests/test_prompt_auto_face.py,tests/test_push_state.py,tests/test_quick_pipelines.py,tests/test_report_words.py,tests/test_rt_pool_minimum.py,tests/test_rumble_mapping.py,tests/test_rumble_menu.py,tests/test_rumble_refresh.py,tests/test_run_all_changed.py,tests/test_same_bind.py,tests/test_same_draw.py,tests/test_same_dyn.py,tests/test_seed_reader.py,tests/test_skip_code.py,tests/test_slow_frames.py,tests/test_status_line.py,tests/test_submitted_page.py,tests/test_table_track.py,tests/test_target_image_pool.py,tests/test_tested_configurations.py,tests/test_tex_spans_once_a_present.py,tests/test_texture_layout_sizes.py,tests/test_ub_gap.py,tests/test_upscale_independent.py,tests/test_upscale_label.py,tests/test_vertex_bind.py,tests/test_vk_swapchain_compat.py,tests/test_wb_pages.pyNot tested: Linux, AMD and Intel GPUs: the change is in the translated IR and a uniform bank, nothing
vendor-specific.
Must be tested:
expecting the scene to change at once, the UI brightness to change the menus only, and no colour jump at Lon Lon
Ranch (Test Farm: @Beanstalk linux amd, PsychoV35 rows change the HDR picture live)
Risks
What could break: the scene's colour with PsychoV35 where the game switches between its two scene permutations
(#344's symptom: PR #400 gave both the same gain; this follows the mod, which treats them apart; tested at Lon Lon
Ranch without a jump); the HDR output with PsychoV35 if another fragment program carried PQ's constants and 1e-4 (the
pass checks the whole shape and logs why it leaves a program); bank 19 on a driver with fewer than 20 uniform buffer
bindings per stage.
Turning it off: the HDR tone mapper row on Vanilla; else revert the commit.
Compatibility: the scene mapping and encoder programs are translated again once (the translator changed); the
options file gains the rows' keys; with PsychoV35 the defaults change the colour space from the game's matrix to
BT.709, as the mod's.
Issues
Fixes #843
See #344
Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
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
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.Made and published with the help of Claude Opus 5.5
Tested in game: RTX 4090, driver 610.47, Windows 11, Native HDR, PsychoV35, DLSS: every PsychoV35 row changes the picture live; Castle Town at night matches RenoDX's mod side by side (colours, bloom, UI brightness, colour spaces); Lon Lon Ranch without colour jumps
Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.