Model detail range replaces the distant detail switch: lod_range scales the depth at which models leave their detailed level (1x, 1.5x, 2x, 3x or max) (#949)

The pick patched before (main+0x1ee8424) is reached through its vtable only when the method is overridden; the culling
passes run about 20 inlined copies of it, so the switch changed almost nothing. The lodrange set patches the two places
per version that compute the level depth B at model setup (the setter and its inlined copy); the slope of the coarser
levels follows from B there, and max takes B = 1e30. The menu row sits under Grass range, with Steady detail under load
after it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-14 21:58:48 +03:00
1 parent 517a161457
commit cf3acd0a2f
11 files changed
+92 -48

No files matched your search

+10 -2
View File
@@ -587,6 +587,14 @@ static void row_grass_range(void) {
opt_choice_list("TOTK_GRASS_RANGE", UI_MENU_GRASS_RANGE, vals, names, 6, UI_MENU_GRASS_RANGE_DESC);
}
// Model detail range (resolution.c res_lod_range): how far models keep their detailed levels, in percent of the game's
// depths, or max for the most detailed level at any depth.
static void row_lod_range(void) {
static const char *const vals[] = {"100", "150", "200", "300", "max"};
const char *names[] = {"1x", "1.5x", "2x", "3x", menu_text(UI_MENU_LOD_RANGE_MAX)};
opt_choice_list("TOTK_LOD_RANGE", UI_MENU_LOD_RANGE, vals, names, 5, UI_MENU_LOD_RANGE_DESC);
}
static void row_gpu(void) {
const char *vals[MAX_GPUS + 1], *names[MAX_GPUS + 1];
char idx[MAX_GPUS][4];
@@ -716,11 +724,11 @@ static void tab_screen(float scale) {
static const char *const aniso[] = {"game", "2", "4", "8", "16"};
const char *aniso_names[] = {menu_text(UI_MENU_ANISO_GAME), "2x", "4x", "8x", "16x"};
opt_choice_list("TOTK_ANISO", UI_MENU_ANISO, aniso, aniso_names, 5, UI_MENU_ANISO_DESC);
opt_toggle("TOTK_LOD_DETAIL", UI_MENU_LOD_DETAIL, UI_MENU_LOD_DETAIL_DESC);
opt_toggle("TOTK_LOD_STEADY", UI_MENU_LOD_STEADY, UI_MENU_LOD_STEADY_DESC);
row_shadow_scale();
row_shadow_range();
row_grass_range();
row_lod_range();
opt_toggle("TOTK_LOD_STEADY", UI_MENU_LOD_STEADY, UI_MENU_LOD_STEADY_DESC);
opt_slider("TOTK_PCSS", UI_MENU_PCSS, 0, 200, UI_MENU_PCSS_DESC, 10, "%.0f %%");
opt_slider("TOTK_CONTACT_SHADOWS", UI_MENU_CONTACT_SHADOWS, 0, 100, UI_MENU_CONTACT_SHADOWS_DESC, 10, "%.0f %%");
opt_toggle("TOTK_DLAA", UI_MENU_DLAA, UI_MENU_DLAA_DESC);