Triforce v0.8.5

A Randomizer page in the launcher, a new title screen with Mods and Save Select tabs, scaling changes applied in game, the Jabu-Jabu bars fixed, renderer frame-time work and the brightness-flash fix, and fixes from the 0.8.4 reports.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-28 10:54:41 -06:00
parent 2df08c751e
commit b527e29adb
203 changed files with 18821 additions and 2051 deletions

View File

@@ -127,33 +127,39 @@ bool temporal_env_chosen() {
return env_xess() > 0 && xess_why() == XESS_OK;
}
int temporal_mode() {
int temporal_mode_of(int choice, bool now) {
const int dlss = env_dlss(), fsr4 = env_fsr4(), xess = env_xess();
int v = opts.dlss;
rearm_on_choice(v);
int v = choice;
if (dlss > 0) v = dlss >= 2 ? ur::DLAA : ur::DLSS; // (2 and up: DLAA, as RX_VK_DLSS was clamped before)
else if (fsr4 > 0) v = fsr4 >= 2 ? ur::FSR4_AA : ur::FSR4;
else if (xess > 0) v = xess >= 2 ? ur::XESS_AA : ur::XESS;
// ((Triforce, 11-22, N64 Classic) while its 3D pass draws the gameplay upscale, the game's own as far as the chain is
// concerned (n64_rules.h upscaler): no jitter, no motion, no feature drawn. The row and the switches keep their values
v = n64_rules::upscaler(n64_in_front(), v);
if (now) v = n64_rules::upscaler(n64_in_front(), v);
// (FSR 3.1, the row's 3, is not an engine of this chain: the game's own as far as it is concerned. Nor anything while
// FSR 3.1 upscales: one upscaler at a time, and one camera jitter. A switch above goes over the row's FSR 3.1 too
// (fsr3_wanted asks temporal_env_chosen); RX_VK_FSR=1 goes over them)
if (!chain_engine(v)) return ur::GAME;
if (fsr3_wanted()) return ur::GAME;
if (fsr3_wanted_of(choice, now)) return ur::GAME;
if (ur::is_dlss(v) && dlss_why() != DLSS_OK) return ur::GAME;
if (ur::is_fsr4(v) && fsr4_why() != FSR_OK) return ur::GAME;
if (ur::is_xess(v) && xess_why() != XESS_OK) return ur::GAME; // ((Triforce) Intel XeSS)
// ((Triforce, FSR4-1) off after failing again and again: the game's own, which the Upscaler row and the rows after it
// then say. Not while it waits to try again: the hooks that feed the chain stay on for the retry)
if (stood_in(v)) return ur::GAME;
if (now && stood_in(v)) return ur::GAME;
return v;
}
int temporal_mode() {
// ((Triforce, 11-26) the row as applied, not as it is being stepped: vk_menu.h applied_dlss)
const int v = applied_dlss();
rearm_on_choice(v);
return temporal_mode_of(v, true);
}
int temporal_stood_in() {
const int dlss = env_dlss(), fsr4 = env_fsr4(), xess = env_xess();
int v = opts.dlss;
int v = applied_dlss(); // ((Triforce, 11-26) as applied)
if (dlss > 0) v = dlss >= 2 ? ur::DLAA : ur::DLSS;
else if (fsr4 > 0) v = fsr4 >= 2 ? ur::FSR4_AA : ur::FSR4;
else if (xess > 0) v = xess >= 2 ? ur::XESS_AA : ur::XESS;
@@ -457,7 +463,8 @@ bool stood_in(int mode) {
const Engine& k = slot_of(mode);
return k.retry.is_off() || k.failed.load(std::memory_order_relaxed);
}
/// A fresh choice on the Upscaler row (opts.dlss changed): an engine off after failures is tried anew, with a count from 0
/// A fresh choice on the Upscaler row (its applied value changed, vk_menu.h applied_dlss): an engine off after failures is
/// tried anew, with a count from 0
void rearm_on_choice(int choice) {
static std::atomic<int> seen{-1};
if (seen.load(std::memory_order_relaxed) == choice) return;
@@ -1908,11 +1915,11 @@ bool chain(VkCommandBuffer cmd, int mode, Engine& engine, const Camera& cam, con
/// inputs and passes, the rest of this the same; mode is then the game's own, as for the chain). RX_VK_DLSS_PRE=0: as before, in place of
/// the upscale's dispatch, on the tone mapped picture (the name is DLSS's from before FSR came: it applies to either)
bool pre_wanted(int mode) {
// (Triforce, 11-13: off until the Upscale before bloom row turns it on, read at the start; RX_VK_DLSS_PRE=0 or 1 over it)
static const bool on = [] {
const int e = env_switch("RX_VK_DLSS_PRE");
return e >= 0 ? e != 0 : upscale_pre_at_start != 0;
}();
// (Triforce, 11-13: off until the Upscale before bloom row turns it on; RX_VK_DLSS_PRE=0 or 1 over it. ((11-26) The row as
// applied, read each time: it was read at the start, and a change took a restart. The engines make their features
// again for the other kind of colour, as for another size: vk_dlss.cpp's key, temporal_rules plan_context)
static const int e = env_switch("RX_VK_DLSS_PRE");
const bool on = e >= 0 ? e != 0 : applied_upscale_pre() != 0;
return on && (chain_engine(mode) || fsr3_pre_wanted());
}