mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 13:59:56 -04:00
Upscale to the picture's size at Ultra Performance, not to the first pass wider than the scene.
At Ultra Performance (an 854x480 scene) the Ocarina frame shape took the first single-target pass wider than the scene as the output pass: a 960x540 post pass comes before the picture's, so DLSS upscaled to 960x540 and that was stretched to the output. The output pass must now be at least the scene over the mode's share (widescreen.c dlss_share, exposed as wide_dlss_share), which skips it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1529,6 +1529,8 @@ static int srgb8(VkFormat f) { return f == VK_FORMAT_R8G8B8A8_SRGB || f == VK_FO
|
||||
// DLAA's depth and motion.
|
||||
static int output_target(VkFormat f) { return srgb8(f) || vk_hdr_native_picture(f); }
|
||||
|
||||
double wide_dlss_share(void); // widescreen.c: the DLSS mode's share of the picture (1 DLAA), 0 off
|
||||
|
||||
void vk_dlaa_pass(VkExec *ex) {
|
||||
const VkExecTarget *c = &ex->color[0], *z = &ex->depth;
|
||||
if (!dl_active()) return;
|
||||
@@ -1583,7 +1585,11 @@ void vk_dlaa_pass(VkExec *ex) {
|
||||
int one = ex->pass_ncolor == 1 && c->image && !z->image && c->image != D.color.image && c->samples <= 1 &&
|
||||
!c->is3d;
|
||||
if (one) F.one_n++, F.one_w = c->width, F.one_h = c->height, F.one_fmt = c->format;
|
||||
if (one && c->width > D.color.width && c->height > D.color.height) {
|
||||
// the output pass is the picture's size, the scene over the mode's share: at Ultra Performance (854 wide) a
|
||||
// 960x540 post pass comes first, and DLSS wrote there, which left a 540-line picture stretched to the output
|
||||
double share = wide_dlss_share();
|
||||
int big = share <= 0 || share >= 1 || c->width >= 0.95 * D.color.width / share;
|
||||
if (one && big && c->width > D.color.width && c->height > D.color.height) {
|
||||
D.ended = D.done = D.up = 1;
|
||||
evaluate(ex, c);
|
||||
} else if (one && output_target(c->format) && c->width == D.color.width &&
|
||||
|
||||
@@ -84,6 +84,9 @@ static unsigned picture_height(void) {
|
||||
// to scale it back up. FSR 3.1 and a mode change while one runs apply at once.
|
||||
// dlaa switched off in the menu stops DLSS at once (vk_dlaa.c vk_dlaa_frame reads it each frame), so the share follows
|
||||
// the setting too: the scene goes back to the game's own scale instead of staying small with nothing to enlarge it.
|
||||
static double dlss_share(void);
|
||||
double wide_dlss_share(void) { return dlss_share(); } // vk_dlaa.c: the mode's share, 0 off
|
||||
|
||||
static double dlss_share(void) {
|
||||
if (!vk_dlaa_wanted() || !cfg_bool("NX2NAVI_DLAA") || (!vk_dlaa_fsr3() && !vk_dlaa_available())) return 0;
|
||||
const char *m = cfg_value("NX2NAVI_DLSS");
|
||||
|
||||
Reference in New Issue
Block a user