Scale the scene with the edge-adaptive filter where the game's own upscaler ran.

The stand-in for the game's upscaler enlarged the scene with a linear filter, which is softer than the console's picture. It now enlarges with the edge-adaptive filter the present already scales to the window with: the same shader, built a second time with a constant set so it squares what it filtered, as the linear pass does. The stored square-root values are filtered as before and the decode is the same. standin_filter = bilinear brings the linear pass back, and the setting is live. The linear pass also stays where nothing is enlarged and while DLSS or FSR 3.1 runs, since that upscaler scales the scene itself and its picture goes over the stand-in's. The movies do not go through this pass and are not changed.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-12 15:05:13 -05:00
parent 495d118e9e
commit 95dc476ee7
9 changed files with 126 additions and 20 deletions

View File

@@ -7089,7 +7089,12 @@ static void untranslated_dispatch_fallback(VkExec *ex) {
#if NX2NAVI_TONEMAP_STANDIN
// The square decode of the stored picture (vk_tonemap.c). Builds of round 24 lost the device with it: its descriptor
// push did not go through the recorder (vk_rec.h rec_push; PORT-HANDOFF 7.12 item 11), which it now does.
VkImage tm = e5 && dst_view ? vk_tonemap_record(ex->cb, e5, VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, dw, dh) : VK_NULL_HANDLE;
// Its edge-adaptive filter is for the picture the screen shows: while DLSS or FSR 3.1 runs (vk_dlaa_active) that
// upscaler scales the scene itself and vk_dlaa_upscaler below puts its picture over this one, so the pass keeps
// its linear filter there, also in the few frames that upscaler misses.
VkImage tm = e5 && dst_view ? vk_tonemap_record(ex->cb, e5, VK_FORMAT_E5B9G9R9_UFLOAT_PACK32, sw, sh, dw, dh,
!vk_dlaa_active())
: VK_NULL_HANDLE;
if (tm) { // the tonemapped picture, already at the target's size, then the same blit as below
ex->dc->B.pipe[1] = VK_NULL_HANDLE; // the replay must bind its compute pipeline again
si = tm, sw = dw, sh = dh;