mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 13:45:57 +00:00
Add shadow map resolution and anisotropic filtering settings
TotK draws its sun cascades into a 960x960 DEPTH16 array of 4 layers, and its static shadows into 1440x1440 and 720x720 arrays of 2, whatever the output resolution, and shrinks the cascades under load. shadow_scale (1 to 4, default 1) creates those images that many times larger on each side: passes into them scale the game's viewports, scissors and support-buffer viewport size, and copies scale their regions, so the game is unaware of it. Images the CPU writes or that alias pool memory keep their size. When the maps are enlarged, depth-compare samplers filter linearly, because the game's few nearest taps are spaced for its own texels and leave hard, stepped edges otherwise. aniso (game, 2, 4, 8, 16; default 16) raises anisotropic filtering of linear mipmapped colour samplers; depth-compare, nearest and unmipmapped samplers keep the game's setting. Both are in totk.ini.example and on the Screen tab of the settings menu (English and Russian). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c3b9a4e7f6
commit
bfb4933531
11 files changed
+118
-15
No files matched your search
@@ -438,6 +438,19 @@ static void row_render_scale(void) {
|
||||
opt_choice_list("TOTK_RENDER_SCALE", UI_MENU_RENDER_SCALE, vals, names, N, UI_MENU_RENDER_SCALE_DESC);
|
||||
}
|
||||
|
||||
static void row_aniso(void) {
|
||||
static const char *const vals[] = {"game", "2", "4", "8", "16"};
|
||||
static const char *names[] = {NULL, "2x", "4x", "8x", "16x"};
|
||||
names[0] = menu_text(UI_MENU_ANISO_GAME);
|
||||
opt_choice_list("TOTK_ANISO", UI_MENU_ANISO, vals, names, 5, UI_MENU_ANISO_DESC);
|
||||
}
|
||||
|
||||
static void row_shadow_scale(void) {
|
||||
static const char *const vals[] = {"1", "2", "3", "4"};
|
||||
static const char *const names[] = {"960 (1x)", "1920 (2x)", "2880 (3x)", "3840 (4x)"};
|
||||
opt_choice_list("TOTK_SHADOW_SCALE", UI_MENU_SHADOW_SCALE, vals, names, 4, UI_MENU_SHADOW_SCALE_DESC);
|
||||
}
|
||||
|
||||
static void row_gpu(void) {
|
||||
const char *vals[MAX_GPUS + 1], *names[MAX_GPUS + 1];
|
||||
char idx[MAX_GPUS][4];
|
||||
@@ -528,6 +541,8 @@ static void tab_screen(float 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 %%");
|
||||
row_aniso();
|
||||
row_shadow_scale();
|
||||
opt_end();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user