mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-23 05:25:56 +00:00
Render the game above 1080p and scale it to the window with FSR 1
The output and scene patch sets make the game read its output, swapchain and scene sizes from the patch page (MacNativeGames' sites for 1.2.1 and 1.4.3); resolution.c picks them from TOTK_OUTPUT_RES and TOTK_RENDER_SCALE and grows the HeapDef texture heap, its parent and the application pool to match. vk_fsr.c runs AMD FSR 1 EASU and RCAS on the present when the window is larger than the game's output (TOTK_UPSCALER, TOTK_SHARPNESS). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
098f8a52da
commit
7abdbc90ac
24 files changed
+6877
-26
No files matched your search
@@ -402,6 +402,35 @@ static void row_window_size(void) {
|
||||
opt_choice_list("TOTK_WINDOW_SIZE", UI_MENU_WINDOW_SIZE, pv, pn, n, UI_MENU_WINDOW_SIZE_DESC);
|
||||
}
|
||||
|
||||
// The game resolution (resolution.c): 16:9 sizes from the game's own 1920x1080 up, and the current value when it is
|
||||
// another size.
|
||||
static void row_output_res(void) {
|
||||
static const char *const vals[] = {"1920x1080", "2560x1440", "3200x1800", "3840x2160"};
|
||||
enum { N = sizeof vals / sizeof *vals };
|
||||
char shown[N][32];
|
||||
const char *names[N];
|
||||
for (int i = 0; i < N; i++) {
|
||||
int w = 0, h = 0;
|
||||
sscanf(vals[i], "%dx%d", &w, &h);
|
||||
snprintf(shown[i], sizeof shown[i], "%d × %d", w, h); // U+00D7, the multiplication sign
|
||||
names[i] = shown[i];
|
||||
}
|
||||
opt_choice_list("TOTK_OUTPUT_RES", UI_MENU_OUTPUT_RES, vals, names, N, UI_MENU_OUTPUT_RES_DESC);
|
||||
}
|
||||
|
||||
static void row_render_scale(void) {
|
||||
static const char *const vals[] = {"game", "50", "67", "75", "100", "125", "150", "200"};
|
||||
enum { N = sizeof vals / sizeof *vals };
|
||||
char shown[N][32];
|
||||
const char *names[N];
|
||||
names[0] = menu_text(UI_MENU_RENDER_SCALE_GAME);
|
||||
for (int i = 1; i < N; i++) {
|
||||
snprintf(shown[i], sizeof shown[i], "%s %%", vals[i]);
|
||||
names[i] = shown[i];
|
||||
}
|
||||
opt_choice_list("TOTK_RENDER_SCALE", UI_MENU_RENDER_SCALE, vals, names, N, UI_MENU_RENDER_SCALE_DESC);
|
||||
}
|
||||
|
||||
static void row_gpu(void) {
|
||||
const char *vals[MAX_GPUS + 1], *names[MAX_GPUS + 1];
|
||||
char idx[MAX_GPUS][4];
|
||||
@@ -480,6 +509,12 @@ static void tab_screen(float scale) {
|
||||
row_gpu();
|
||||
static const UiTextId perf[] = {UI_MENU_PERF_OFF, UI_MENU_PERF_FPS, UI_MENU_PERF_FULL};
|
||||
opt_choice("TOTK_PERF_OVERLAY", UI_MENU_PERF_OVERLAY, perf, 3, UI_MENU_PERF_OVERLAY_DESC);
|
||||
opt_group(UI_MENU_GRAPHICS);
|
||||
row_output_res();
|
||||
row_render_scale();
|
||||
static const UiTextId up[] = {UI_MENU_UPSCALER_FSR, UI_MENU_UPSCALER_BILINEAR};
|
||||
opt_choice("TOTK_UPSCALER", UI_MENU_UPSCALER, up, 2, UI_MENU_UPSCALER_DESC);
|
||||
opt_slider("TOTK_SHARPNESS", UI_MENU_SHARPNESS, 0, 100, UI_MENU_SHARPNESS_DESC, 5, "%.0f %%");
|
||||
opt_end();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user