diff --git a/docs/settings.md b/docs/settings.md index 7d581507..cdbada78 100644 --- a/docs/settings.md +++ b/docs/settings.md @@ -203,7 +203,7 @@ These names are code patch sets built into the generated game code (`recomp/patc | Setting | What it does | Effect of changing it | Safety | | --- | --- | --- | --- | | `aspect_patch` (default `0`) | Patch set that feeds the camera the output's aspect ratio when it is not 16:9. | The resolution code switches this set on or off itself at start, so a value here is replaced; the code does not settle what a manual value does. | Unknown | -| `fixed_res_patch` (default `0`) | Patch set that holds the game's dynamic resolution at 100 percent (the scene tier). | The resolution code switches this set itself unless `dynamic_res = 1`; a manual value is replaced. | Unknown | +| `fixed_res_patch` (default `0`) | Patch set that holds the game's dynamic resolution at 100 percent (the scene tier). | The resolution code switches this set from `dynamic_res` (on at `0`); a manual value is replaced. | Unknown | | `fov_patch` (default `0`) | Patch set that scales the camera's vertical view angle by the field-of-view setting. | The resolution code switches this set itself whenever the field of view is not 100 percent; a manual value is replaced. | Unknown | | `mouse_direct_patch` (default `1`) | Patch set of the hooks in the game's camera code behind `mouse_mode = direct` on game 1.4.3. | `0` stops `mouse_mode = direct` from taking effect; other mouse modes are unaffected. | Safe | | `patch_output` (default `0`) | Patch set that makes the game use the configured output size for its swapchain and display configuration. | The resolution code switches this set whenever the output differs from the base size; a manual value is replaced. | Unknown | diff --git a/runtime/cfg.c b/runtime/cfg.c index 3511e0cf..104a6022 100644 --- a/runtime/cfg.c +++ b/runtime/cfg.c @@ -119,7 +119,7 @@ static const CfgMeta metas[] = { {"VK_PRESENT", "mailbox", "mailbox|fifo|immediate", LIVE}, {"GPU_INDEX", "", NULL, RESTART}, {"PERF_OVERLAY", "off", "off|fps|full", LIVE}, {"OUTPUT_RES", "1920x1080", NULL, RESTART}, {"RENDER_SCALE", "game", "game|50|67|75|100|125|150|200", RESTART}, - {"DYNAMIC_RES", "0", "0|1", LIVE}, // resolution.c res_dynres_live + {"DYNAMIC_RES", "1", "0|1", LIVE}, // resolution.c res_dynres_live {"UPSCALER", "fsr", "fsr|bilinear", LIVE}, {"SHARPNESS", "80", "0..100", LIVE}, {"DLAA", "0", "0|1", RESTART}, {"DLSS", "dlaa", "dlaa|quality|balanced|performance|ultra_performance", LIVE}, {"DLSS_PRESET", "default", "default|k|j", LIVE}, @@ -291,7 +291,7 @@ int cfg_load(const char *path) { // Starting points to replace with measured ones (docs/tester-guide.md, Steam Deck). static const struct { const char *key, *value; } DECK[] = { {"FULLSCREEN", "1"}, {"WINDOW_SIZE", "1280x800"}, {"OUTPUT_RES", "1280x800"}, {"RENDER_SCALE", "game"}, - {"VK_PRESENT", "fifo"}, {"FPS_LIMIT", "40"}, {"DYNAMIC_RES", "1"}, + {"VK_PRESENT", "fifo"}, {"FPS_LIMIT", "40"}, }; static int profile = -1; // 0 none, 1 Steam Deck diff --git a/runtime/resolution.c b/runtime/resolution.c index 6084e204..3980de67 100644 --- a/runtime/resolution.c +++ b/runtime/resolution.c @@ -595,15 +595,14 @@ void res_fov_live(void) { rt_log("resolution: field of view %d%% of the game's", pct); } -// TOTK_DYNAMIC_RES = 0 (default) holds the game's dynamic resolution at 100 % (recomp/patches-v121.txt and -// patches-v143.txt, set fixres), so the scene renders at the size render_scale chose. The game picks its tier (100, 90 -// or 80 %) mostly from a fixed cost model made for the Switch: one term grows with the object counts, one with -// (scene width / 1600) squared. The GPU time it also measures (two NVN report timestamps, a frame apart) only lowers -// that prediction when the GPU is slower than the model says, which a PC GPU never is, so the model alone decides. -// Measured on 1.2.1: a 2867-wide scene stays at 100 %, one wider than about 2970 does not, and a 4267-wide one -// (5120x1440 at render_scale 83) fits no tier and falls back to 80 % every frame, whatever the GPU's load. 1 lets the -// game step again (the Steam Deck profile's default, cfg.c DECK, where the scene is far narrower). Runs on a settings -// change (gfx_present.c window_settings_live), like res_fov_live. +// TOTK_DYNAMIC_RES = 0 holds the game's dynamic resolution at 100 % (recomp/patches-v121.txt and patches-v143.txt, +// set fixres), so the scene renders at the size render_scale chose. The game picks its tier (100, 90 or 80 %) mostly +// from a fixed cost model made for the Switch: one term grows with the object counts, one with (scene width / 1600) +// squared. The GPU time it also measures (two NVN report timestamps, a frame apart) only lowers that prediction when the +// GPU is slower than the model says, which a PC GPU never is, so the model alone decides. Measured on 1.2.1: a +// 2867-wide scene stays at 100 %, one wider than about 2970 does not, and a 4267-wide one (5120x1440 at render_scale +// 83) fits no tier and falls back to 80 % every frame, whatever the GPU's load. 1 (the default) leaves the game's own +// stepping and the set off. Runs on a settings change (gfx_present.c window_settings_live), like res_fov_live. void res_dynres_live(void) { static int set = -2, shown = -1; if (set == -2) set = rt_patch_set("fixres"); @@ -615,7 +614,8 @@ void res_dynres_live(void) { return; } rt_patch_switch(set, !dyn); - rt_log("resolution: dynamic resolution %s", dyn ? "the game's own (100, 90 or 80 %)" : "off: the scene stays at 100 %"); + rt_log("resolution: dynamic resolution %s", + dyn ? "on: the game's own 100, 90 or 80 %" : "off: the scene stays at 100 %"); } void res_wanted(unsigned out[2]) { diff --git a/totk.ini.example b/totk.ini.example index f64b7c7a..39ed189e 100644 --- a/totk.ini.example +++ b/totk.ini.example @@ -180,9 +180,9 @@ # render_scale = game # Dynamic resolution: 1 lets the game lower the scene to 90 or 80 % of that size, 0 keeps it at 100 %. The game decides # by a cost estimate made for the Switch, which grows with the scene's width and ignores how fast your GPU is: a -# scene wider than about 3000 pixels can drop to 80 % on any GPU. 0 is the default (1 on the Steam Deck). 1.2.1 and -# 1.4.3. Changes in the menu take effect at once. -# dynamic_res = 0 +# scene wider than about 3000 pixels can drop to 80 % on any GPU. 1 is the default. 1.2.1 and 1.4.3. Changes in +# the menu take effect at once. +# dynamic_res = 1 # Scaling to the window when it is larger than the game resolution: fsr (AMD FSR 1) or bilinear, and FSR's sharpening # from 0 (off) to 100. Changes while the game runs take effect at once. # upscaler = fsr