mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 19:39:57 -04:00
Merge main into the 0.9.1 release: the launcher's Mods screen, the anti-aliasing choices beside FSR and DLSS, and the scene's last row and column filled before an upscaler reads it.
The 0.9.1 notes keep the release branch's text and take main's sections: New, the edge line under Fixed, and Changed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -44,7 +44,7 @@ static const char *const known[] = {
|
||||
"BIND_SKIP", "BIND_STATS", "BIND_UP", "BIND_X", "BIND_Y",
|
||||
"BIND_ZL", "BIND_ZR", "BLOCK_VIEWS_3D", "CACHE_DIE", "CLOTH_REALTIME", "COLOR_BRIGHTNESS", "COMPUTE_KEEP", "COLOR_CONTRAST", "COLOR_GAMMA",
|
||||
"COLOR_PRESET", "COLOR_SATURATION", "CONTACT_DEBUG", "CONTACT_SHADOWS", "CORE_DIAG", "CRIT", "CRIT_OUT",
|
||||
"DESC_TEMPLATE", "DEVICE_PROFILE", "DISCORD_APP_ID", "DISCORD_IMAGE", "DISCORD_RPC", "DLAA", "DLAA_CAM_KEEP", "DLAA_CUT", "DLSS_IDLE_FREE", "DLAA_JITTER", "DLAA_MV", "DLAA_MASKDEBUG", "DLAA_MVDEBUG", "DLAA_OBJMV", "DLAA_SURVEY", "DLAA_TARGET_KEEP", "DLAA_TIMES", "DLSS", "DLSS_CHAR_MASK", "DLSS_PRESET", "DLSS_REACTIVE", "DUMP", "DUMP_BUF", "DUMP_DIR",
|
||||
"DESC_TEMPLATE", "DEVICE_PROFILE", "DISCORD_APP_ID", "DISCORD_IMAGE", "DISCORD_RPC", "DLAA", "DLAA_CAM_KEEP", "DLAA_CUT", "DLSS_IDLE_FREE", "DLAA_EDGE_FILL", "DLAA_JITTER", "DLAA_MV", "DLAA_MASKDEBUG", "DLAA_MVDEBUG", "DLAA_OBJMV", "DLAA_SURVEY", "DLAA_TARGET_KEEP", "DLAA_TIMES", "DLSS", "DLSS_CHAR_MASK", "DLSS_PRESET", "DLSS_REACTIVE", "DUMP", "DUMP_BUF", "DUMP_DIR",
|
||||
"DUMP_LOG", "DUMP_RAW", "DUMP_SHADERS", "DUMP_FILE", "DS3", "LOG_CS_BINDS", "LOG_TEX_FLAGS", "LOG_MESH", "MESH", "POOL", "NATIVE_TENSOR", "LOG_RCOND", "LOG_RT_SIZES", "DUMP_WHITE", "DUMP_AFTER", "DUMP_MOVIE", "SUBMIT_FINISH", "ACQUIRE_WAIT", "CRASH_FILTER_GUARD", "CS_FALLBACK", "EXEFS", "FEEDBACK", "FIX_C0", "FIX_ZERO", "FLIGHT", "FLIGHT_AT", "FLIGHT_DIR", "FLIGHT_FRAMES", "GPU_TIMELINE",
|
||||
"FFX_PIPE_CACHE", "FLIGHT_SPIKE_MS", "FLIGHT_THUMBS", "FLIGHT_EVERY", "FLUSH_SPAN", "FLUSH_UPLOAD", "FOG_CULL", "FOLIAGE_SHADOW_CULL", "FOLIAGE_SHADOW_VRS", "FOV", "FOV_PATCH", "FG_HUDLESS_SHOW", "FG_MULT", "FPS60", "FPS_LIMIT", "FRAMEGEN", "FRAMEGEN_MULTIPLIER", "FREEZE_IDLE", "FREEZE_ASYNC", "FREEZE_BUDGET_US", "FREE_CORES",
|
||||
"FULLSCREEN", "FXAA", "GAME_ASPECT", "GAME_RES", "GPA", "GPA_EMPTY", "GPA_TWIN", "GPA_TWIN_MAX_KB", "MIRROR_CAPTURE_KB", "WB_SKIP_MB", "GPL", "GPL_DRAW_BUILD", "GPL_FEEDBACK", "PIPE_AHEAD", "PIPE_FAST_WORKERS", "PIPE_FRAME_WAIT_MS", "PIPE_LINK_DRAW_MS", "PIPE_SKIP_STEADY", "PROG_LEAD", "GPU", "GPU_INDEX", "GPU_PASSES", "GPU_NAME", "HDR",
|
||||
|
||||
@@ -923,6 +923,21 @@ static void upscaling_name(char *out, size_t size) {
|
||||
else snprintf(out, size, mode ? "DLSS %s" : "NVIDIA %s", menu_text(dlss[mode]));
|
||||
}
|
||||
|
||||
// The Anti-aliasing row's value for the performance overlay: what row_aa shows, with "TAA + " before it while DLSS's or
|
||||
// FSR's TAA runs with it (as upscaling_name tells it: FSR 3.1 set where it cannot load runs nothing), and TAA alone
|
||||
// for off then.
|
||||
static void aa_name(char *out, size_t size) {
|
||||
static const char *const values[] = {"game", "off", "fxaa", "smaa"};
|
||||
static const UiTextId names[] = {UI_MENU_AA_GAME, UI_MENU_FRAMEGEN_OFF, UI_MENU_AA_FXAA, UI_MENU_AA_SMAA};
|
||||
int i = 0;
|
||||
for (int k = 0; k < 4; k++)
|
||||
if (!strcmp(cfg_value("NX2NAVI_AA"), values[k])) i = k; // taa: the game's SMAA, with the upscaler or alone
|
||||
const bool taa = cfg_bool("NX2NAVI_DLAA") && (strcmp(cfg_value("NX2NAVI_TAA"), "fsr3") || vk_ffx_available());
|
||||
if (taa && i == 1) snprintf(out, size, "TAA");
|
||||
else if (taa) snprintf(out, size, "TAA + %s", menu_text(names[i]));
|
||||
else snprintf(out, size, "%s", menu_text(names[i]));
|
||||
}
|
||||
|
||||
// The Upscaling row's NVIDIA DLSS waits for a restart (vk_dlaa_needs_restart), where DLSS is offered: the row's note and
|
||||
// the Restart button's count (restart_pending).
|
||||
static bool upscaling_restart(void) { return dlss_offered() && vk_dlaa_needs_restart(); }
|
||||
@@ -990,43 +1005,48 @@ static void row_upscaling(void) {
|
||||
// FSR 4 that failed in a row stays listed (it runs on this device) while FSR 3.1 serves: the row shows FSR 3.1, and
|
||||
// choosing FSR 4 again tries it anew
|
||||
if (e.kind == FSR4) vk_ffx4_retry();
|
||||
// the Anti-aliasing row follows: DLSS and FSR 3.1 are its TAA, and leaving them leaves TAA for the game's SMAA
|
||||
if (e.kind >= DLSS) opt_apply("NX2NAVI_AA", "taa");
|
||||
else if (!strcmp(cfg_value("NX2NAVI_AA"), "taa")) opt_apply("NX2NAVI_AA", "game");
|
||||
// The Anti-aliasing row keeps its choice, which runs along with DLSS's or FSR's TAA (vk_aa.c vk_aa_mode); its TAA
|
||||
// went with the temporal mode, so leaving that leaves the game's SMAA
|
||||
if (e.kind < DLSS && !strcmp(cfg_value("NX2NAVI_AA"), "taa")) opt_apply("NX2NAVI_AA", "game");
|
||||
}
|
||||
|
||||
// Anti-aliasing (vk_aa.c NX2NAVI_AA): the game's own SMAA (the default), off, FXAA or SMAA in its place, or TAA, which is
|
||||
// DLSS or FSR 3.1 at the scene's size, the Upscaling row's temporal modes. TAA is listed where one of them runs: NVIDIA
|
||||
// DLAA where DLSS is offered, else FSR 3.1 Native AA where it loads. While a temporal mode is set (dlaa), the row shows
|
||||
// TAA, noted as the Upscaling row's when that mode also scales. Choosing TAA sets the upscaler to the native mode;
|
||||
// choosing another value turns the temporal upscaler off, with frame generation, which needs it, as the Upscaling row
|
||||
// does for bilinear and FSR 1, and the picture is then fitted to the window as that row had it.
|
||||
// DLSS or FSR at the scene's size, the Upscaling row's temporal modes. Without a temporal mode set (dlaa), TAA is listed
|
||||
// where one runs: NVIDIA DLAA where DLSS is offered and taa does not name FSR, else FSR 4 Native AA where it runs, else
|
||||
// FSR 3.1 Native AA where it loads; choosing it sets that native mode, as the Upscaling row would. While a temporal mode
|
||||
// is set its TAA always runs, and the row picks what runs with it: the game's SMAA, nothing, FXAA or SMAA, noted as joined
|
||||
// by the Upscaling row's TAA. A choice then leaves the upscaler and frame generation as they are. taa itself, set before
|
||||
// or in the ini, shows as the game's SMAA, which is what runs with the upscaler (or without one, where it cannot run).
|
||||
static void row_aa(void) {
|
||||
enum { GAME, OFF, FXAA, SMAA, TAA };
|
||||
static const char *const values[] = {"game", "off", "fxaa", "smaa", "taa"};
|
||||
const bool dlss = dlss_offered(), fsr = vk_ffx_available(), temporal = cfg_bool("NX2NAVI_DLAA");
|
||||
const bool fsr_set = !strcmp(cfg_value("NX2NAVI_TAA"), "fsr3");
|
||||
const bool dlss = dlss_offered(), fsr = vk_ffx_available(), fsr4 = fsr && vk_ffx4_available();
|
||||
const bool temporal = cfg_bool("NX2NAVI_DLAA"), fsr_set = !strcmp(cfg_value("NX2NAVI_TAA"), "fsr3");
|
||||
const char *names[5] = {menu_text(UI_MENU_AA_GAME), menu_text(UI_MENU_FRAMEGEN_OFF), menu_text(UI_MENU_AA_FXAA),
|
||||
menu_text(UI_MENU_AA_SMAA), nullptr};
|
||||
int n = 4;
|
||||
if (dlss || fsr || temporal)
|
||||
names[n++] = menu_text((temporal ? !fsr_set : dlss) ? UI_MENU_AA_TAA_DLSS : UI_MENU_AA_TAA_FSR);
|
||||
enum { NONE, K_DLSS, K_FSR3, K_FSR4 };
|
||||
const int kind = dlss && (!fsr_set || !fsr) ? K_DLSS : fsr4 ? K_FSR4 : fsr ? K_FSR3 : NONE;
|
||||
static char taa[96];
|
||||
if (!temporal && kind) {
|
||||
if (kind == K_FSR4) snprintf(taa, sizeof taa, menu_text(UI_MENU_AA_TAA_FSR4), fsr4_label());
|
||||
else snprintf(taa, sizeof taa, "%s", menu_text(kind == K_DLSS ? UI_MENU_AA_TAA_DLSS : UI_MENU_AA_TAA_FSR));
|
||||
names[n++] = taa;
|
||||
}
|
||||
int cur = GAME;
|
||||
if (temporal) cur = TAA;
|
||||
else
|
||||
for (int i = 0; i < 4; i++)
|
||||
if (!strcmp(cfg_value("NX2NAVI_AA"), values[i])) cur = i;
|
||||
const char *note = temporal && strcmp(cfg_value("NX2NAVI_DLSS"), "dlaa") ? menu_text(UI_MENU_AA_UPSCALER) : nullptr;
|
||||
for (int i = 0; i < 4; i++)
|
||||
if (!strcmp(cfg_value("NX2NAVI_AA"), values[i])) cur = i;
|
||||
// FSR 3.1 set where it cannot load runs nothing (the Upscaling row says so): no TAA joins the choice then
|
||||
const char *note = temporal && (!fsr_set || fsr) ? menu_text(UI_MENU_AA_WITH_TAA) : nullptr;
|
||||
int nv = opt_choice_index("NX2NAVI_AA", UI_MENU_AA, names, n, cur, GAME, UI_MENU_AA_DESC, note);
|
||||
if (nv < 0 || nv >= n || nv == cur) return;
|
||||
if (nv == TAA) {
|
||||
if (nv == TAA) { // listed only without a temporal mode: the native one of that upscaler, as row_upscaling sets it
|
||||
opt_apply("NX2NAVI_UPSCALER", "bilinear");
|
||||
opt_apply("NX2NAVI_DLAA", "1");
|
||||
opt_apply("NX2NAVI_DLSS", "dlaa");
|
||||
opt_apply("NX2NAVI_TAA", dlss ? "dlss" : "fsr3");
|
||||
if (!dlss) opt_apply("NX2NAVI_FSR4", "0");
|
||||
} else if (temporal) {
|
||||
opt_apply("NX2NAVI_DLAA", "0");
|
||||
opt_apply("NX2NAVI_FRAMEGEN", "off");
|
||||
opt_apply("NX2NAVI_TAA", kind == K_DLSS ? "dlss" : "fsr3");
|
||||
if (kind != K_DLSS) opt_apply("NX2NAVI_FSR4", kind == K_FSR4 ? "1" : "0");
|
||||
if (kind == K_FSR4) vk_ffx4_retry();
|
||||
}
|
||||
opt_apply("NX2NAVI_AA", values[nv]);
|
||||
}
|
||||
@@ -1886,27 +1906,28 @@ static void perf_picture(const MenuTarget *t, PerfPanel *p) {
|
||||
snprintf(v[1], sizeof v[1], menu_text(UI_MENU_OV_FMT_SIZE), (unsigned)t->image_w, (unsigned)t->image_h);
|
||||
snprintf(v[2], sizeof v[2], menu_text(UI_MENU_OV_FMT_SCENE), scene[0], scene[1], scene[0] * 100.0 / out[0]);
|
||||
upscaling_name(v[3], sizeof v[3]);
|
||||
aa_name(v[4], sizeof v[4]);
|
||||
double hz = frame_step_limit_hz();
|
||||
snprintf(v[4], sizeof v[4], "%s", menu_text(UI_MENU_OV_NONE));
|
||||
if (hz > 0) snprintf(v[4], sizeof v[4], menu_text(UI_MENU_OV_FPS), hz);
|
||||
snprintf(v[5], sizeof v[5], "%s", menu_text(strcmp(cfg_value("NX2NAVI_VK_PRESENT"), "immediate") ? UI_MENU_ON : UI_MENU_OFF));
|
||||
v[6][0] = v[7][0] = 0;
|
||||
snprintf(v[5], sizeof v[5], "%s", menu_text(UI_MENU_OV_NONE));
|
||||
if (hz > 0) snprintf(v[5], sizeof v[5], menu_text(UI_MENU_OV_FPS), hz);
|
||||
snprintf(v[6], sizeof v[6], "%s", menu_text(strcmp(cfg_value("NX2NAVI_VK_PRESENT"), "immediate") ? UI_MENU_ON : UI_MENU_OFF));
|
||||
v[7][0] = v[8][0] = 0;
|
||||
if (wide_available()) {
|
||||
const char *a = cfg_value("NX2NAVI_GAME_ASPECT");
|
||||
snprintf(v[6], sizeof v[6], "%s", menu_text(!strcmp(a, "window") ? UI_MENU_GAME_ASPECT_WINDOW : !strcmp(a, "21:9") ? UI_MENU_GAME_ASPECT_21_9
|
||||
snprintf(v[7], sizeof v[7], "%s", menu_text(!strcmp(a, "window") ? UI_MENU_GAME_ASPECT_WINDOW : !strcmp(a, "21:9") ? UI_MENU_GAME_ASPECT_21_9
|
||||
: !strcmp(a, "32:9") ? UI_MENU_GAME_ASPECT_32_9 : UI_MENU_GAME_ASPECT_16_9));
|
||||
const char *r = cfg_value("NX2NAVI_GAME_RES");
|
||||
if (!strcmp(r, "window")) snprintf(v[7], sizeof v[7], "%s", menu_text(UI_MENU_GAME_RES_NATIVE));
|
||||
else snprintf(v[7], sizeof v[7], "%sp", r);
|
||||
if (!strcmp(r, "window")) snprintf(v[8], sizeof v[8], "%s", menu_text(UI_MENU_GAME_RES_NATIVE));
|
||||
else snprintf(v[8], sizeof v[8], "%sp", r);
|
||||
}
|
||||
const char *hdr = cfg_value("NX2NAVI_HDR");
|
||||
snprintf(v[8], sizeof v[8], "%s", menu_text(!strcmp(hdr, "native") ? UI_MENU_HDR_NATIVE : cfg_bool("NX2NAVI_HDR") ? UI_MENU_HDR_TONEMAPPED : UI_MENU_FRAMEGEN_OFF));
|
||||
snprintf(v[9], sizeof v[9], "%s", menu_text(!strcmp(hdr, "native") ? UI_MENU_HDR_NATIVE : cfg_bool("NX2NAVI_HDR") ? UI_MENU_HDR_TONEMAPPED : UI_MENU_FRAMEGEN_OFF));
|
||||
const char *fg = cfg_value("NX2NAVI_FRAMEGEN");
|
||||
const bool fsr_fg = !strcmp(fg, "fsr3") && vk_ffx_framegen_available(); // set but not loadable: off
|
||||
snprintf(v[9], sizeof v[9], "%s", fsr_fg ? (vk_fg4_active() ? fg4_label() : "AMD FSR 3.1")
|
||||
snprintf(v[10], sizeof v[10], "%s", fsr_fg ? (vk_fg4_active() ? fg4_label() : "AMD FSR 3.1")
|
||||
: !strcmp(fg, "dlss") ? "NVIDIA DLSS" : menu_text(UI_MENU_FRAMEGEN_OFF));
|
||||
if (!strcmp(fg, "dlss") && vk_dlssg_active()) // its multiplier as set, clamped to what this GPU allows
|
||||
snprintf(v[9], sizeof v[9], "NVIDIA DLSS %dx",
|
||||
snprintf(v[10], sizeof v[10], "NVIDIA DLSS %dx",
|
||||
vk_dlssg_multiplier_of(cfg_value("NX2NAVI_FRAMEGEN_MULTIPLIER"), vk_dlssg_multiplier_max(nullptr), nullptr));
|
||||
// The 3D scene's size is known only where resolution.c sets it (the builds with its patch sets); Ocarina sizes its
|
||||
// own scene dynamically and res_sizes would report a fixed 1600x900, so the line is left out
|
||||
|
||||
@@ -165,14 +165,15 @@ void waits(const PerfStats &s) {
|
||||
}
|
||||
|
||||
void picture(const PerfPanel *p) {
|
||||
static const UiTextId labels[10] = {UI_MENU_OV_WINDOW, UI_MENU_OV_OUTPUT, UI_MENU_OV_SCENE, UI_MENU_UPSCALING, UI_MENU_OV_LIMIT,
|
||||
UI_MENU_PRESENT_VSYNC, UI_MENU_GAME_ASPECT, UI_MENU_GAME_RES, UI_MENU_HDR, UI_MENU_FRAMEGEN};
|
||||
static const UiTextId labels[11] = {UI_MENU_OV_WINDOW, UI_MENU_OV_OUTPUT, UI_MENU_OV_SCENE, UI_MENU_UPSCALING, UI_MENU_AA,
|
||||
UI_MENU_OV_LIMIT, UI_MENU_PRESENT_VSYNC, UI_MENU_GAME_ASPECT, UI_MENU_GAME_RES, UI_MENU_HDR,
|
||||
UI_MENU_FRAMEGEN};
|
||||
if (!ImGui::BeginTable("##perfp", 2, ImGuiTableFlags_SizingFixedFit)) return;
|
||||
float vw = 0;
|
||||
for (const auto &v : p->picture) vw = fmaxf(vw, ImGui::CalcTextSize(v).x);
|
||||
ImGui::TableSetupColumn("##p0", ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableSetupColumn("##p1", ImGuiTableColumnFlags_WidthFixed, vw);
|
||||
for (int i = 0; i < 10; i++) {
|
||||
for (int i = 0; i < 11; i++) {
|
||||
if ((i == 2 && !p->scene_known) || !p->picture[i][0]) continue;
|
||||
label(labels[i]);
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
@@ -10,9 +10,9 @@ extern "C" {
|
||||
typedef struct {
|
||||
PerfStats s; // perfmon_snapshot
|
||||
const char *version; // "NX2navi <version>, game <update>"
|
||||
// window, game image, scene, then the settings as the menu names them: upscaling, frame limit, VSync, widescreen,
|
||||
// resolution, HDR, frame generation. An empty string leaves its line out.
|
||||
char picture[10][64];
|
||||
// window, game image, scene, then the settings as the menu names them: upscaling, anti-aliasing, frame limit, VSync,
|
||||
// widescreen, resolution, HDR, frame generation. An empty string leaves its line out.
|
||||
char picture[11][64];
|
||||
bool scene_known; // the scene line is shown (resolution.c sets the scene's size)
|
||||
float fg_fps; // frames the display gets with frame generation, 0 without it
|
||||
bool under_menu; // the menu is open: the panel goes under its window
|
||||
|
||||
@@ -154,14 +154,16 @@ static const char *const text_en[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_AA] = "Anti-aliasing",
|
||||
[UI_MENU_AA_DESC] = "How the edges of the 3D picture are smoothed. Game SMAA is the game's own, as on the console. Off "
|
||||
"leaves the edges as drawn. FXAA is quick and a little soft. SMAA finds more of the edges than the "
|
||||
"game's and keeps detail sharp. TAA is DLSS or FSR 3.1 at full size: the steadiest edges in motion; "
|
||||
"it sets the upscaler. Takes effect at once.",
|
||||
"game's and keeps detail sharp. TAA is DLSS or FSR at full size: the steadiest edges in motion; it "
|
||||
"sets the upscaler. With DLSS or FSR set under Upscaling their TAA always runs, and the "
|
||||
"choice here runs along with it. Takes effect at once.",
|
||||
[UI_MENU_AA_GAME] = "Game SMAA",
|
||||
[UI_MENU_AA_FXAA] = "FXAA",
|
||||
[UI_MENU_AA_SMAA] = "SMAA (Ultra)",
|
||||
[UI_MENU_AA_TAA_DLSS] = "TAA (NVIDIA DLAA)",
|
||||
[UI_MENU_AA_TAA_FSR] = "TAA (AMD FSR 3.1)",
|
||||
[UI_MENU_AA_UPSCALER] = "set by Upscaling",
|
||||
[UI_MENU_AA_TAA_FSR4] = "TAA (%s)", // FSR 4's name as the Upscaling row gives it ("AMD FSR 4.1")
|
||||
[UI_MENU_AA_WITH_TAA] = "plus TAA from Upscaling",
|
||||
|
||||
[UI_MENU_FPS_LIMIT] = "Frame rate limit",
|
||||
[UI_MENU_FPS_LIMIT_DESC] = "The highest frame rate the game draws at. Frame generation adds its frames on top.",
|
||||
@@ -844,14 +846,16 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_AA] = "Сглаживание",
|
||||
[UI_MENU_AA_DESC] = "Как сглаживаются края 3D-картинки. SMAA игры — собственное, как на консоли. «Выкл.» оставляет края "
|
||||
"как есть. FXAA быстрое и слегка мягкое. SMAA находит больше краёв, чем игровое, и сохраняет "
|
||||
"чёткость. TAA — это DLSS или FSR 3.1 в полном размере: самые устойчивые края в движении; задаёт "
|
||||
"масштабирование. Действует сразу.",
|
||||
"чёткость. TAA — это DLSS или FSR в полном размере: самые устойчивые края в движении; задаёт "
|
||||
"масштабирование. Когда в Upscaling выбран DLSS или FSR, их TAA работает всегда, а "
|
||||
"выбранное здесь — вместе с ним. Действует сразу.",
|
||||
[UI_MENU_AA_GAME] = "SMAA игры",
|
||||
[UI_MENU_AA_FXAA] = "FXAA",
|
||||
[UI_MENU_AA_SMAA] = "SMAA (Ultra)",
|
||||
[UI_MENU_AA_TAA_DLSS] = "TAA (NVIDIA DLAA)",
|
||||
[UI_MENU_AA_TAA_FSR] = "TAA (AMD FSR 3.1)",
|
||||
[UI_MENU_AA_UPSCALER] = "задано масштабированием",
|
||||
[UI_MENU_AA_TAA_FSR4] = "TAA (%s)",
|
||||
[UI_MENU_AA_WITH_TAA] = "плюс TAA из Upscaling",
|
||||
|
||||
[UI_MENU_FPS_LIMIT] = "Ограничение частоты кадров",
|
||||
[UI_MENU_FPS_LIMIT_DESC] = "Максимальная частота кадров, которые рисует игра. Генерация кадров добавляет свои сверх неё.",
|
||||
@@ -1836,14 +1840,16 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_AA] = "Antisserrilhado",
|
||||
[UI_MENU_AA_DESC] = "Como as bordas da imagem 3D são suavizadas. SMAA do jogo é o próprio, como no console. Desligado "
|
||||
"deixa as bordas como desenhadas. FXAA é rápido e um pouco suave. SMAA encontra mais bordas que o do "
|
||||
"jogo e mantém os detalhes nítidos. TAA é o DLSS ou o FSR 3.1 em tamanho cheio: as bordas mais "
|
||||
"estáveis em movimento; define o escalonamento. Vale na hora.",
|
||||
"jogo e mantém os detalhes nítidos. TAA é o DLSS ou o FSR em tamanho cheio: as bordas mais "
|
||||
"estáveis em movimento; define o escalonamento. Com DLSS ou FSR em Upscaling, o TAA deles "
|
||||
"sempre roda, e a escolha daqui roda junto. Vale na hora.",
|
||||
[UI_MENU_AA_GAME] = "SMAA do jogo",
|
||||
[UI_MENU_AA_FXAA] = "FXAA",
|
||||
[UI_MENU_AA_SMAA] = "SMAA (Ultra)",
|
||||
[UI_MENU_AA_TAA_DLSS] = "TAA (NVIDIA DLAA)",
|
||||
[UI_MENU_AA_TAA_FSR] = "TAA (AMD FSR 3.1)",
|
||||
[UI_MENU_AA_UPSCALER] = "definido pelo escalonamento",
|
||||
[UI_MENU_AA_TAA_FSR4] = "TAA (%s)",
|
||||
[UI_MENU_AA_WITH_TAA] = "mais o TAA do Upscaling",
|
||||
[UI_MENU_TAB_CHEATS] = "Cheats",
|
||||
[UI_MENU_CHEATS_NONE] = "Nenhum cheat para esta versão do jogo. Os cheats de um mod são um arquivo de cheats do "
|
||||
"Atmosphere na pasta cheats dele, com o nome da build do jogo: mods\\<mod>\\cheats\\%s. "
|
||||
@@ -2614,13 +2620,15 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
|
||||
[UI_MENU_FXAA_DESC] = "游戏自身的 FXAA 边缘平滑。会让细节略微模糊;开启 DLAA 时不需要。",
|
||||
[UI_MENU_AA] = "抗锯齿",
|
||||
[UI_MENU_AA_DESC] = "3D 画面边缘的平滑方式。游戏 SMAA 是游戏自带的,与主机相同。关闭则保留原始边缘。FXAA 快速,略显柔和。SMAA 比游戏自带的找到更多边缘,并保持细节清晰。TAA 即全尺寸的 DLSS 或 "
|
||||
"FSR 3.1:运动中边缘最稳定;它会设置放大方式。立即生效。",
|
||||
"FSR:运动中边缘最稳定;它会设置放大方式。在 Upscaling 中选择 DLSS 或 FSR 时,它们的 TAA 始终运行,"
|
||||
"此处的选择与其一同运行。立即生效。",
|
||||
[UI_MENU_AA_GAME] = "游戏 SMAA",
|
||||
[UI_MENU_AA_FXAA] = "FXAA",
|
||||
[UI_MENU_AA_SMAA] = "SMAA(极高)",
|
||||
[UI_MENU_AA_TAA_DLSS] = "TAA(NVIDIA DLAA)",
|
||||
[UI_MENU_AA_TAA_FSR] = "TAA(AMD FSR 3.1)",
|
||||
[UI_MENU_AA_UPSCALER] = "由放大设置决定",
|
||||
[UI_MENU_AA_TAA_FSR4] = "TAA(%s)",
|
||||
[UI_MENU_AA_WITH_TAA] = "另加 Upscaling 的 TAA",
|
||||
[UI_MENU_TAB_CHEATS] = "金手指",
|
||||
[UI_MENU_CHEATS_NONE] = "此游戏版本没有金手指。模组的金手指是它的 cheats 文件夹中以游戏构建命名的 Atmosphere "
|
||||
"金手指文件:mods\\<模组>\\cheats\\%s。重启游戏后才会读取。对于修改游戏代码的金手指,"
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef enum {
|
||||
UI_MENU_DLSS_PRESET_DEFAULT, UI_MENU_DLSS_PRESET_K, UI_MENU_DLSS_PRESET_J, UI_MENU_DLSS_CHARS, UI_MENU_DLSS_CHARS_DESC,
|
||||
UI_MENU_DLSS_CHARS_OFF, UI_MENU_DLSS_CHARS_LIGHT, UI_MENU_DLSS_CHARS_MEDIUM, UI_MENU_DLSS_CHARS_FULL, UI_MENU_FXAA, UI_MENU_FXAA_DESC,
|
||||
UI_MENU_AA, UI_MENU_AA_DESC, UI_MENU_AA_GAME, UI_MENU_AA_FXAA, UI_MENU_AA_SMAA, UI_MENU_AA_TAA_DLSS, UI_MENU_AA_TAA_FSR,
|
||||
UI_MENU_AA_UPSCALER,
|
||||
UI_MENU_AA_TAA_FSR4, UI_MENU_AA_WITH_TAA,
|
||||
|
||||
// Game
|
||||
UI_MENU_FPS_LIMIT, UI_MENU_FPS_LIMIT_DESC, UI_MENU_FPS_30, UI_MENU_FPS_40, UI_MENU_FPS_45, UI_MENU_FPS_60, UI_MENU_FPS_90,
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
// replace the composition (vk_exec_draw.c aa_dispatch) with one of the passes here, which read the same composite and
|
||||
// write the same words: off stores it as it is, fxaa smooths it first (shaders/aa_post.comp), smaa runs SMAA at its
|
||||
// Ultra preset (shaders/smaa_*.comp, the reference implementation in shaders/smaa.glsl with the area and search
|
||||
// textures of third_party/smaa). taa is DLSS or FSR 3.1 at the scene's own size: the menu sets the upscaler for it
|
||||
// (ui/menu.cpp row_aa). While DLSS or FSR 3.1 anti-aliases the scene (dlaa = 1 and it runs), the game's SMAA stays as it
|
||||
// is whatever aa says: they take the picture after it, and their inputs are tuned with it.
|
||||
// textures of third_party/smaa). taa is DLSS or FSR at the scene's own size: the menu sets the upscaler for it
|
||||
// (ui/menu.cpp row_aa), and the game's SMAA runs with it. While DLSS or FSR anti-aliases or scales the scene (dlaa = 1),
|
||||
// game, off, fxaa and smaa still choose the pass above: in their native modes the upscalers run before the bloom (vk_dlaa.c,
|
||||
// "where DLAA runs") and the pass smooths their picture after it, in the scaling modes the pass runs on the scene first
|
||||
// and the upscaler scales its result. off then leaves the upscaler's TAA alone on the edges.
|
||||
//
|
||||
// The game's passes are known by a hash of their guest code (vk_aa_role), which does not change with the translator or
|
||||
// its settings. Everything here runs on the replay thread.
|
||||
@@ -61,13 +63,13 @@ int vk_aa_role(uint64_t guest_hash) {
|
||||
|
||||
static const char *const NAMES[] = {"game", "off", "fxaa", "smaa"};
|
||||
|
||||
// DLSS or FSR 3.1 anti-aliases this frame's scene: dlaa = 1 and one of them runs (vk_dlaa.c)
|
||||
// DLSS or FSR anti-aliases this frame's scene: dlaa = 1 and one of them runs (vk_dlaa.c)
|
||||
static int temporal(void) { return cfg_bool("NX2NAVI_DLAA") && (vk_dlaa_available() || vk_dlaa_fsr3()); }
|
||||
|
||||
static struct {
|
||||
uint64_t frame_read;
|
||||
int mode; // this frame's (vk_aa_mode)
|
||||
int said; // the last refusal logged: 1 + the mode refused, 0 none
|
||||
int said; // taa was last logged as waiting for DLSS or FSR
|
||||
int composed; // the last composition seen was replaced (vk_aa_composed): the passes before it may go
|
||||
uint64_t frames_on, composes; // frames with a replacement asked for, compositions replaced
|
||||
int none_told;
|
||||
@@ -81,14 +83,13 @@ int vk_aa_mode(void) {
|
||||
int want = VK_AA_GAME;
|
||||
for (int i = 1; i < 4; i++)
|
||||
if (!strcmp(v, NAMES[i])) want = i;
|
||||
int tmp = want != VK_AA_GAME && temporal();
|
||||
int said = tmp ? 1 + want : !strcmp(v, "taa") && !temporal() ? 1 + 4 : 0;
|
||||
// taa is the game's SMAA with DLSS's or FSR's TAA; without them at work, the game's SMAA alone
|
||||
int said = !strcmp(v, "taa") && !temporal();
|
||||
if (said != A.said) {
|
||||
A.said = said;
|
||||
if (said == 5) rt_log("aa: taa needs DLSS or FSR 3.1 at work (dlaa = 1): the game's SMAA stays");
|
||||
else if (said) rt_log("aa: %s waits while DLSS or FSR 3.1 anti-aliases the scene: the game's SMAA stays", NAMES[want]);
|
||||
if (said) rt_log("aa: taa needs DLSS or FSR at work (dlaa = 1): the game's SMAA stays");
|
||||
}
|
||||
A.mode = tmp ? VK_AA_GAME : want;
|
||||
A.mode = want;
|
||||
if (A.mode != VK_AA_GAME && !A.none_told && ++A.frames_on == 3600 && !A.composes) {
|
||||
A.none_told = 1; // a game version or a frame without the passes this file knows: nothing is replaced
|
||||
rt_log("aa: aa = %s found none of the game's SMAA passes in %llu frames: the picture stays the game's",
|
||||
|
||||
@@ -1816,6 +1816,40 @@ static void release_kept(const struct Size *making, int all) {
|
||||
making->w, making->h, all ? "after a release" : "larger inputs");
|
||||
}
|
||||
|
||||
// The scene's last column and row after a jitter to the left or up. The jitter moves the scene's viewport by under half a
|
||||
// pixel (vk_dlaa_viewport), which keeps every pixel centre inside it, yet on an RX 7900 XT (AMD's Windows driver) the
|
||||
// draws of a viewport moved left left the last column out, and of one moved up the last row: the driver evidently limits
|
||||
// drawing to the whole pixels inside the viewport. In a frame dump (NX2NAVI_DUMP, Hyrule Field, 3416x1440, FSR 4 Native
|
||||
// AA) the depth's last row kept its clear value through every scene pass and the light target held the fog's colour
|
||||
// there, which the upscaler blended into a grey line along the bottom and right edges of the picture that flickered with
|
||||
// the jitter; with NX2NAVI_DLAA_JITTER=0, and without DLSS or FSR, there was no line. Before DLSS or FSR reads the scene,
|
||||
// such a column or row of the light target and of the depth (which the motion vectors are made from) is filled from the
|
||||
// one next to it. NX2NAVI_DLAA_EDGE_FILL=0 (test): not filled.
|
||||
static void edge_fill(VkCommandBuffer cb, const VkExecTarget *t, const VkExecTarget *z, float jx, float jy) {
|
||||
static int on = -1;
|
||||
if (on < 0) on = rt_knob("DLAA_EDGE_FILL", "1");
|
||||
uint32_t w = t->width, h = t->height;
|
||||
if (!on || w < 2 || h < 2 || (jx >= 0 && jy >= 0)) return;
|
||||
static int told;
|
||||
if (!told++) rt_log("dlaa: the scene's last column or row after a jitter to the left or up is filled from the one before it");
|
||||
// the column first, then the row over the whole width, so the corner comes from the filled column
|
||||
for (int pass = 0; pass < 2; pass++) {
|
||||
if (pass ? jy >= 0 : jx >= 0) continue;
|
||||
VkOffset3D from = pass ? (VkOffset3D){0, (int32_t)h - 2, 0} : (VkOffset3D){(int32_t)w - 2, 0, 0};
|
||||
VkOffset3D to = pass ? (VkOffset3D){0, (int32_t)h - 1, 0} : (VkOffset3D){(int32_t)w - 1, 0, 0};
|
||||
VkExtent3D ext = pass ? (VkExtent3D){w, 1, 1} : (VkExtent3D){1, h, 1};
|
||||
for (int i = 0; i < 2; i++) {
|
||||
const VkExecTarget *g = i ? z : t;
|
||||
if (!g->image || g->width != w || g->height != h) continue;
|
||||
VkImageAspectFlags a = i ? VK_IMAGE_ASPECT_DEPTH_BIT : VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
VkImageCopy r = {.srcSubresource = {a, g->level, g->base_layer, 1}, .srcOffset = from,
|
||||
.dstSubresource = {a, g->level, g->base_layer, 1}, .dstOffset = to, .extent = ext};
|
||||
vkCmdCopyImage(cb, g->image, VK_IMAGE_LAYOUT_GENERAL, g->image, VK_IMAGE_LAYOUT_GENERAL, 1, &r);
|
||||
}
|
||||
full_barrier(cb);
|
||||
}
|
||||
}
|
||||
|
||||
// Set when the scene the upscaler runs on has another size than the last one; vk_dlaa_resized_take reads it.
|
||||
static volatile int32_t size_changed;
|
||||
|
||||
@@ -1846,6 +1880,7 @@ static void evaluate(VkExec *ex, const VkExecTarget *dst) {
|
||||
VkImageView zv = vk_exec_target_view(z->img, z->format, VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_ASPECT_DEPTH_BIT, z->level,
|
||||
z->base_layer, 1, 0);
|
||||
float jx = D.jit_used ? D.ux : 0.0f, jy = D.jit_used ? D.uy : 0.0f;
|
||||
edge_fill(cb, t, z, jx, jy); // before the motion vectors read the depth
|
||||
static int no_mv = -1;
|
||||
if (no_mv < 0) no_mv = !rt_knob("DLAA_MV", "1"); // NX2NAVI_DLAA_MV=0: zero motion (test)
|
||||
int masked = 0, mv = no_mv ? 0 : mv_pass(ex, e, zv, jx, jy, char_bias(), &masked);
|
||||
|
||||
Reference in New Issue
Block a user