From 7b7e4fe50521ed5e1c288f9f304e34b7d73fe097 Mon Sep 17 00:00:00 2001 From: Zarigis Date: Wed, 25 Nov 2026 17:04:11 -0800 Subject: [PATCH 1/3] Video > Map zoom blur: an option to leave out the world map's blur As it opens and after each zoom, the world map blurs the screen (1280x720, four passes each way) and blends that back over the map for about half a second. With the option off, the two blend draws are skipped while the map is open; the blur passes themselves are shared with other effects and stay. On by default (the game's own look). --- runtime/control_settings.c | 1 + runtime/nvn/vulkan/exec.c | 5 +++++ runtime/settings.c | 3 +++ runtime/settings.h | 2 ++ runtime/ui/game_options.mm | 3 +++ runtime/ui/i18n/de.inc | 2 ++ runtime/ui/i18n/es.inc | 2 ++ runtime/ui/i18n/fr.inc | 2 ++ runtime/ui/i18n/he.inc | 2 ++ runtime/ui/i18n/it.inc | 2 ++ runtime/ui/i18n/ja.inc | 2 ++ runtime/ui/i18n/ko.inc | 2 ++ runtime/ui/i18n/nl.inc | 2 ++ runtime/ui/i18n/pt.inc | 2 ++ runtime/ui/i18n/ru.inc | 2 ++ runtime/ui/i18n/th.inc | 2 ++ runtime/ui/i18n/zh-Hans.inc | 2 ++ runtime/ui/i18n/zh-Hant.inc | 2 ++ 18 files changed, 40 insertions(+) diff --git a/runtime/control_settings.c b/runtime/control_settings.c index 53acfd12b..05c982c54 100644 --- a/runtime/control_settings.c +++ b/runtime/control_settings.c @@ -57,6 +57,7 @@ static const Setting settings[] = { I(hdr_gamma, 0, 2, "none|2.2|bt1886"), I(hdr_ui_nits, 0, 1000, NULL), I(fov, 50, 200, NULL), I(hud_size, 0, 150, NULL), B(dynamic_hud), I(menu_speed, 70, 300, NULL), B(bloom), B(depth_of_field), + B(map_zoom_blur), B(grass), I(grass_distance, 0, GRASS_DIST_COUNT - 1, "auto|potato|original|medium|high"), B(lens_flare), B(fast_fma),I(color_exposure, -20, 20, NULL), I(color_contrast, -50, 50, NULL), I(color_saturation, -100, 100, NULL), I(color_temperature, -100, 100, NULL), I(color_tint, -100, 100, NULL), diff --git a/runtime/nvn/vulkan/exec.c b/runtime/nvn/vulkan/exec.c index b0a0a65a7..73ddf10ea 100644 --- a/runtime/nvn/vulkan/exec.c +++ b/runtime/nvn/vulkan/exec.c @@ -9199,6 +9199,11 @@ static void draw_(CmdRec *r, bool indexed) { if (bloom) { stat_skipped++; return; } } if (!g_settings.depth_of_field && g_cur_fs_hash == UINT64_C(0xf7731492223eb16a)) { stat_skipped++; return; } + // Map zoom blur off: as it opens and after each zoom, the world map blurs the screen (1280x720, four passes each + // way) and blends that back over the map for about half a second, through a mask and a ramp. Its two blend draws + // are skipped while the map is open (the blur passes themselves are shared with other effects). + if (!g_settings.map_zoom_blur && (g_cur_fs_hash == UINT64_C(0x6da1591e7d7e6726) || + g_cur_fs_hash == UINT64_C(0xdfddd20310007579)) && framepace_map_ui()) { stat_skipped++; return; } // The bloom's fixed tap offsets must address adjacent console-size texels. // Enlarging those images spaces the taps apart and produces separate copies // of emissive details; odd mip scratch sizes also stopped inheriting scale. diff --git a/runtime/settings.c b/runtime/settings.c index 0ca89f26b..5c5ab524d 100644 --- a/runtime/settings.c +++ b/runtime/settings.c @@ -104,6 +104,7 @@ Settings g_settings = { .haze = 100, .bloom = true, .depth_of_field = true, + .map_zoom_blur = true, .grass = true, .lens_flare = true, .fast_fma = true, @@ -689,6 +690,7 @@ void settings_load(void) { } else if (!strcmp(key, "bloom")) g_settings.bloom = atoi(val) != 0; else if (!strcmp(key, "depth_of_field")) g_settings.depth_of_field = atoi(val) != 0; + else if (!strcmp(key, "map_zoom_blur")) g_settings.map_zoom_blur = atoi(val) != 0; else if (!strcmp(key, "grass")) g_settings.grass = atoi(val) != 0; else if (!strcmp(key, "grass_distance")) { g_settings.grass_distance = GRASS_DIST_FOLLOW; @@ -991,6 +993,7 @@ bool settings_save_to(const char *path) { fprintf(f, "haze = %d\n", g_settings.haze); fprintf(f, "bloom = %d\n", g_settings.bloom ? 1 : 0); fprintf(f, "depth_of_field = %d\n", g_settings.depth_of_field ? 1 : 0); + fprintf(f, "map_zoom_blur = %d\n", g_settings.map_zoom_blur ? 1 : 0); fprintf(f, "grass = %d\n", g_settings.grass ? 1 : 0); int gd = g_settings.grass_distance; fprintf(f, "grass_distance = %s\n", k_grass_dist[gd >= 0 && gd < GRASS_DIST_COUNT ? gd : GRASS_DIST_FOLLOW]); diff --git a/runtime/settings.h b/runtime/settings.h index 2cfef1891..ad7b1e92b 100644 --- a/runtime/settings.h +++ b/runtime/settings.h @@ -222,6 +222,8 @@ typedef struct { int haze; // the air's haze, percent of the game's (services/fs.c haze_patch; from the next start) bool bloom; // the glow around bright light (off: its draws clear their images: vulkan/exec.c) bool depth_of_field; // the distance blur over far pixels (off: its draw is skipped: vulkan/exec.c) + bool map_zoom_blur; // the blur the world map lays over itself as it opens and after each zoom (off: its blend + // draws are skipped: vulkan/exec.c) bool grass; // grass blades and crossed quads (off: draw_distance.c hides both layers) int grass_distance; // GRASS_DIST_*: independent grass draw distance (0: follow draw_distance) bool lens_flare; // sun glare / lens flare (off: vulkan/exec.c skips sun occlusion queries) diff --git a/runtime/ui/game_options.mm b/runtime/ui/game_options.mm index 587f01478..74716c61c 100644 --- a/runtime/ui/game_options.mm +++ b/runtime/ui/game_options.mm @@ -1020,6 +1020,9 @@ void build_items(void) { v.push_back(toggle(P_VIDEO_ADV, "Depth of field", "Blurs the far distance. Off: sharp out to the horizon.", [](const Item &) { return (int)g_settings.depth_of_field; }, [](const Item &, int x) { g_settings.depth_of_field = x; }, 1)); + v.push_back(toggle(P_VIDEO_ADV, "Map zoom blur", "Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", + [](const Item &) { return (int)g_settings.map_zoom_blur; }, + [](const Item &, int x) { g_settings.map_zoom_blur = x; }, 1)); v.push_back(toggle(P_VIDEO_ADV, "Grass", "Grass blades and ground cover. Off: bare terrain, faster.", [](const Item &) { return (int)g_settings.grass; }, [](const Item &, int x) { g_settings.grass = x; }, 1)); diff --git a/runtime/ui/i18n/de.inc b/runtime/ui/i18n/de.inc index 1c8bec4a7..113fd9ec4 100644 --- a/runtime/ui/i18n/de.inc +++ b/runtime/ui/i18n/de.inc @@ -953,6 +953,8 @@ T("Bloom", "Bloom") T("The glow around bright light. Off: a little faster.", "Das Leuchten um helles Licht. Aus: etwas schneller.") T("Depth of field", "Tiefenschärfe") T("Blurs the far distance. Off: sharp out to the horizon.", "Macht die Ferne unscharf. Aus: scharf bis zum Horizont.") +T("Map zoom blur", "Kartenzoom-Unschärfe") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "Macht die Karte beim Öffnen und nach jedem Zoomen kurz unscharf. Aus: sofort scharf.") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "Stellt Sichtweite, Schatten, Upscaler, Kantenglättung, Texturfilterung und die erweiterten Optionen auf einmal ein. Potato: für schwache PCs (näher, kleinere Schatten, FSR 1, kein Bloom und keine Tiefenschärfe). Original: wie auf der Konsole. Hoch und Savage: weiter und schärfer, für schnellere PCs.") T("Advanced", "Erweitert") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "Das Leuchten um helles Licht: Sonne, Feuer, leuchtende Augen. Aus: etwas schneller, ein flacheres Bild.") diff --git a/runtime/ui/i18n/es.inc b/runtime/ui/i18n/es.inc index 8e320d09e..5c050fd93 100644 --- a/runtime/ui/i18n/es.inc +++ b/runtime/ui/i18n/es.inc @@ -1078,6 +1078,8 @@ T("Bloom", "Bloom") T("The glow around bright light. Off: a little faster.", "El resplandor alrededor de las luces fuertes. Desactivado: un poco más rápido.") T("Depth of field", "Profundidad de campo") T("Blurs the far distance. Off: sharp out to the horizon.", "Desenfoca la lejanía. Desactivada: nítido hasta el horizonte.") +T("Map zoom blur", "Desenfoque al hacer zoom en el mapa") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "Desenfoca el mapa un momento al abrirlo y tras cada zoom. Desactivado: nítido al instante.") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "Ajusta a la vez la distancia de dibujado, las sombras, el escalador, el antialiasing, el filtrado de texturas y las opciones avanzadas. Potato: para PCs modestos (más cerca, sombras más pequeñas, FSR 1, sin bloom ni profundidad de campo). Original: como en la consola. Alta y Savage: más lejos y más nítido, para PCs más rápidos.") T("Advanced", "Avanzado") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "El resplandor alrededor de las luces fuertes: el sol, el fuego, los ojos que brillan. Desactivado: un poco más rápido, una imagen más plana.") diff --git a/runtime/ui/i18n/fr.inc b/runtime/ui/i18n/fr.inc index 25d03b37d..1b40bb704 100644 --- a/runtime/ui/i18n/fr.inc +++ b/runtime/ui/i18n/fr.inc @@ -953,6 +953,8 @@ T("Bloom", "Bloom") T("The glow around bright light. Off: a little faster.", "Le halo autour des lumières vives. Désactivé : un peu plus rapide.") T("Depth of field", "Profondeur de champ") T("Blurs the far distance. Off: sharp out to the horizon.", "Floute le lointain. Désactivée : net jusqu'à l'horizon.") +T("Map zoom blur", "Flou du zoom de la carte") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "Rend la carte floue un instant à l'ouverture et après chaque zoom. Désactivé : nette tout de suite.") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "Règle d'un coup la distance d'affichage, les ombres, l'upscaler, l'anticrénelage, le filtrage des textures et les options avancées. Potato : pour les PC modestes (plus proche, ombres plus petites, FSR 1, sans bloom ni profondeur de champ). Original : comme sur la console. Élevé et Savage : plus loin et plus net, pour les PC plus rapides.") T("Advanced", "Avancé") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "Le halo autour des lumières vives : le soleil, le feu, les yeux qui brillent. Désactivé : un peu plus rapide, une image plus plate.") diff --git a/runtime/ui/i18n/he.inc b/runtime/ui/i18n/he.inc index de8711aff..9151df6c7 100644 --- a/runtime/ui/i18n/he.inc +++ b/runtime/ui/i18n/he.inc @@ -946,6 +946,8 @@ T("Bloom", "Bloom") T("The glow around bright light. Off: a little faster.", "הזוהר סביב אור חזק. כבוי: מעט מהיר יותר.") T("Depth of field", "עומק שדה") T("Blurs the far distance. Off: sharp out to the horizon.", "מטשטש את המרחק. כבוי: חד עד האופק.") +T("Map zoom blur", "טשטוש בזום המפה") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "מטשטש את המפה לרגע בפתיחה ואחרי כל זום. כבוי: חדה מיד.") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "מגדיר בבת אחת את מרחק התצוגה, הצללים, ההגדלה, החלקת הקצוות, סינון המרקמים והאפשרויות המתקדמות. Potato: למחשבים חלשים (קרוב יותר, צללים קטנים יותר, FSR 1, בלי בלום ועומק שדה). Original: כמו בקונסולה. גבוה ו-Savage: רחוק וחד יותר, למחשבים מהירים יותר.") T("Advanced", "מתקדם") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "הזוהר סביב אור חזק: השמש, אש, עיניים זוהרות. כבוי: מעט מהיר יותר, תמונה שטוחה יותר.") diff --git a/runtime/ui/i18n/it.inc b/runtime/ui/i18n/it.inc index fc87649ea..11c91d44a 100644 --- a/runtime/ui/i18n/it.inc +++ b/runtime/ui/i18n/it.inc @@ -953,6 +953,8 @@ T("Bloom", "Bloom") T("The glow around bright light. Off: a little faster.", "Il bagliore attorno alle luci forti. Disattivato: un po' più veloce.") T("Depth of field", "Profondità di campo") T("Blurs the far distance. Off: sharp out to the horizon.", "Sfoca la distanza. Disattivata: nitido fino all'orizzonte.") +T("Map zoom blur", "Sfocatura dello zoom della mappa") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "Sfoca la mappa per un attimo all'apertura e dopo ogni zoom. Disattivata: nitida subito.") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "Imposta insieme la distanza di visualizzazione, le ombre, l'upscaler, l'antialiasing, il filtro delle texture e le opzioni avanzate. Potato: per PC deboli (più vicino, ombre più piccole, FSR 1, senza bloom né profondità di campo). Original: come su console. Alta e Savage: più lontano e più nitido, per PC più veloci.") T("Advanced", "Avanzate") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "Il bagliore attorno alle luci forti: il sole, il fuoco, gli occhi che brillano. Disattivato: un po' più veloce, un'immagine più piatta.") diff --git a/runtime/ui/i18n/ja.inc b/runtime/ui/i18n/ja.inc index 4b658a9c6..fbfbb4cd8 100644 --- a/runtime/ui/i18n/ja.inc +++ b/runtime/ui/i18n/ja.inc @@ -953,6 +953,8 @@ T("Bloom", "ブルーム") T("The glow around bright light. Off: a little faster.", "強い光のまわりの輝き。オフ:少し速くなります。") T("Depth of field", "被写界深度") T("Blurs the far distance. Off: sharp out to the horizon.", "遠くをぼかします。オフ:地平線までくっきり。") +T("Map zoom blur", "マップズーム時のぼかし") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "マップを開いたときとズームのたびに一瞬ぼかします。オフ:すぐにくっきり。") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "描画距離、影、アップスケーラー、アンチエイリアス、テクスチャフィルタリング、詳細オプションをまとめて設定します。Potato: 低スペックPC向け(近め、小さい影、FSR 1、ブルームと被写界深度なし)。Original: 本体と同じ。HighとSavage: より遠く、よりくっきり、高速なPC向け。") T("Advanced", "詳細") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "強い光のまわりの輝き(太陽、炎、光る目)。オフ:少し速くなり、絵が平坦になります。") diff --git a/runtime/ui/i18n/ko.inc b/runtime/ui/i18n/ko.inc index 4affe2e5d..8f5b9df20 100644 --- a/runtime/ui/i18n/ko.inc +++ b/runtime/ui/i18n/ko.inc @@ -953,6 +953,8 @@ T("Bloom", "블룸") T("The glow around bright light. Off: a little faster.", "밝은 빛 주변의 번짐. 끄면 조금 더 빨라집니다.") T("Depth of field", "피사계 심도") T("Blurs the far distance. Off: sharp out to the horizon.", "먼 곳을 흐리게 합니다. 끄면 지평선까지 선명합니다.") +T("Map zoom blur", "지도 확대/축소 흐림") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "지도를 열 때와 확대/축소할 때마다 잠시 흐리게 합니다. 끄면 바로 선명합니다.") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "그리기 거리, 그림자, 업스케일러, 안티앨리어싱, 텍스처 필터링과 고급 옵션을 한 번에 설정합니다. Potato: 저사양 PC용(더 가깝게, 작은 그림자, FSR 1, 블룸과 피사계 심도 없음). Original: 콘솔과 같음. High와 Savage: 더 멀리, 더 선명하게, 빠른 PC용.") T("Advanced", "고급") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "밝은 빛 주변의 번짐: 태양, 불, 빛나는 눈. 끄면 조금 더 빨라지고 화면이 더 평평해집니다.") diff --git a/runtime/ui/i18n/nl.inc b/runtime/ui/i18n/nl.inc index a275fedff..b34b42f47 100644 --- a/runtime/ui/i18n/nl.inc +++ b/runtime/ui/i18n/nl.inc @@ -953,6 +953,8 @@ T("Bloom", "Bloom") T("The glow around bright light. Off: a little faster.", "De gloed rond fel licht. Uit: iets sneller.") T("Depth of field", "Scherptediepte") T("Blurs the far distance. Off: sharp out to the horizon.", "Maakt de verte wazig. Uit: scherp tot aan de horizon.") +T("Map zoom blur", "Vervaging bij kaartzoom") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "Maakt de kaart bij het openen en na elke zoom even wazig. Uit: meteen scherp.") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "Stelt tekenafstand, schaduwen, upscaler, anti-aliasing, texturefiltering en de geavanceerde opties in één keer in. Potato: voor zwakke pc's (dichterbij, kleinere schaduwen, FSR 1, geen bloom of scherptediepte). Original: zoals op de console. Hoog en Savage: verder en scherper, voor snellere pc's.") T("Advanced", "Geavanceerd") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "De gloed rond fel licht: de zon, vuur, gloeiende ogen. Uit: iets sneller, een vlakker beeld.") diff --git a/runtime/ui/i18n/pt.inc b/runtime/ui/i18n/pt.inc index 7f7988d0c..43ba47a18 100644 --- a/runtime/ui/i18n/pt.inc +++ b/runtime/ui/i18n/pt.inc @@ -953,6 +953,8 @@ T("Bloom", "Bloom") T("The glow around bright light. Off: a little faster.", "O brilho em volta das luzes fortes. Desligado: um pouco mais rápido.") T("Depth of field", "Profundidade de campo") T("Blurs the far distance. Off: sharp out to the horizon.", "Desfoca a distância. Desligada: nítido até ao horizonte.") +T("Map zoom blur", "Desfoque do zoom do mapa") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "Desfoca o mapa por um instante ao abrir e após cada zoom. Desligado: nítido de imediato.") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "Ajusta de uma vez a distância de desenho, as sombras, o upscaler, o anti-aliasing, a filtragem de texturas e as opções avançadas. Potato: para PCs fracos (mais perto, sombras menores, FSR 1, sem bloom nem profundidade de campo). Original: como no console. Alto e Savage: mais longe e mais nítido, para PCs mais rápidos.") T("Advanced", "Avançado") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "O brilho em volta das luzes fortes: o sol, o fogo, olhos que brilham. Desligado: um pouco mais rápido, uma imagem mais plana.") diff --git a/runtime/ui/i18n/ru.inc b/runtime/ui/i18n/ru.inc index 843384940..62dce2216 100644 --- a/runtime/ui/i18n/ru.inc +++ b/runtime/ui/i18n/ru.inc @@ -953,6 +953,8 @@ T("Bloom", "Bloom") T("The glow around bright light. Off: a little faster.", "Свечение вокруг яркого света. Выкл.: немного быстрее.") T("Depth of field", "Глубина резкости") T("Blurs the far distance. Off: sharp out to the horizon.", "Размывает даль. Выкл.: резко до горизонта.") +T("Map zoom blur", "Размытие при масштабировании карты") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "Ненадолго размывает карту при открытии и после каждого изменения масштаба. Выкл.: сразу чётко.") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "Сразу задаёт дальность прорисовки, тени, апскейлер, сглаживание, фильтрацию текстур и расширенные настройки. Potato: для слабых ПК (ближе, меньше тени, FSR 1, без свечения и глубины резкости). Original: как на консоли. High и Savage: дальше и чётче, для более быстрых ПК.") T("Advanced", "Дополнительно") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "Свечение вокруг яркого света: солнце, огонь, светящиеся глаза. Выкл.: немного быстрее, более плоская картинка.") diff --git a/runtime/ui/i18n/th.inc b/runtime/ui/i18n/th.inc index 893b6cb38..ecee18803 100644 --- a/runtime/ui/i18n/th.inc +++ b/runtime/ui/i18n/th.inc @@ -953,6 +953,8 @@ T("Bloom", "Bloom") T("The glow around bright light. Off: a little faster.", "แสงเรืองรอบแสงจ้า ปิด: เร็วขึ้นเล็กน้อย") T("Depth of field", "ระยะชัดลึก") T("Blurs the far distance. Off: sharp out to the horizon.", "ทำให้ระยะไกลเบลอ ปิด: คมชัดถึงขอบฟ้า") +T("Map zoom blur", "ภาพเบลอเมื่อซูมแผนที่") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "ทำให้แผนที่เบลอชั่วครู่เมื่อเปิดและหลังการซูมแต่ละครั้ง ปิด: คมชัดทันที") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "ตั้งค่าระยะการมองเห็น เงา ตัวอัปสเกล แอนตี้เอเลียส การกรองพื้นผิว และตัวเลือกขั้นสูงในครั้งเดียว Potato: สำหรับพีซีสเปกต่ำ (ใกล้ขึ้น เงาเล็กลง FSR 1 ไม่มีบลูมและระยะชัดลึก) Original: เหมือนบนคอนโซล High และ Savage: ไกลและคมชัดขึ้น สำหรับพีซีที่เร็วกว่า") T("Advanced", "ขั้นสูง") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "แสงเรืองรอบแสงจ้า: ดวงอาทิตย์ ไฟ ดวงตาที่เรืองแสง ปิด: เร็วขึ้นเล็กน้อย ภาพแบนลง") diff --git a/runtime/ui/i18n/zh-Hans.inc b/runtime/ui/i18n/zh-Hans.inc index c27cbe7a9..198fd8243 100644 --- a/runtime/ui/i18n/zh-Hans.inc +++ b/runtime/ui/i18n/zh-Hans.inc @@ -953,6 +953,8 @@ T("Bloom", "泛光") T("The glow around bright light. Off: a little faster.", "强光周围的光晕。关闭:稍快一些。") T("Depth of field", "景深") T("Blurs the far distance. Off: sharp out to the horizon.", "模糊远处。关闭:直到地平线都清晰。") +T("Map zoom blur", "地图缩放模糊") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "打开地图时和每次缩放后让地图短暂模糊。关闭:立即清晰。") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "一次性设置绘制距离、阴影、超分辨率、抗锯齿、纹理过滤和高级选项。Potato:适合性能较弱的电脑(更近、阴影更小、FSR 1、无泛光和景深)。Original:与主机相同。High 和 Savage:更远更清晰,适合更快的电脑。") T("Advanced", "高级") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "强光周围的光晕:太阳、火焰、发光的眼睛。关闭:稍快一些,画面更平淡。") diff --git a/runtime/ui/i18n/zh-Hant.inc b/runtime/ui/i18n/zh-Hant.inc index 69ecb2471..6750e7c9c 100644 --- a/runtime/ui/i18n/zh-Hant.inc +++ b/runtime/ui/i18n/zh-Hant.inc @@ -953,6 +953,8 @@ T("Bloom", "光暈") T("The glow around bright light. Off: a little faster.", "強光周圍的光暈。關閉:稍快一些。") T("Depth of field", "景深") T("Blurs the far distance. Off: sharp out to the horizon.", "模糊遠處。關閉:直到地平線都清晰。") +T("Map zoom blur", "地圖縮放模糊") +T("Blurs the map for a moment when it opens and after each zoom. Off: sharp straight away.", "打開地圖時和每次縮放後讓地圖短暫模糊。關閉:立即清晰。") T("Sets the draw distance, shadows, upscaler, anti-aliasing, texture filtering and the Advanced options at once. Potato: for weak PCs (nearer, smaller shadows, FSR 1, no bloom or depth of field). Original: as on the console. High and Savage: further and sharper, for faster PCs.", "一次設定繪製距離、陰影、超解析度、反鋸齒、材質過濾和進階選項。Potato:適合效能較弱的電腦(更近、陰影更小、FSR 1、無泛光和景深)。Original:與主機相同。High 和 Savage:更遠更清晰,適合更快的電腦。") T("Advanced", "進階") T("The glow around bright light: the sun, fire, glowing eyes. Off: a little faster, a flatter image.", "強光周圍的光暈:太陽、火焰、發光的眼睛。關閉:稍快一些,畫面更平淡。") From f4361204f17b68520711a1fdb3164d0d0d6e7493 Mon Sep 17 00:00:00 2001 From: Zarigis Date: Wed, 25 Nov 2026 23:23:48 -0800 Subject: [PATCH 2/3] Map zoom blur off: no blur on zooming either, and no blocky frame between levels --- runtime/nvn/vulkan/exec.c | 97 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 2 deletions(-) diff --git a/runtime/nvn/vulkan/exec.c b/runtime/nvn/vulkan/exec.c index 73ddf10ea..eebd4090c 100644 --- a/runtime/nvn/vulkan/exec.c +++ b/runtime/nvn/vulkan/exec.c @@ -9114,6 +9114,50 @@ static void wait_built(_Atomic int *state) { // (0 building: until built or fai perfcount_add(PC_BUILD_WAIT_NS, SDL_GetTicksNS() - t0); } +// Map zoom blur off: switching levels, the game stops drawing the old level's tiles a frame or two before the new +// level's are in, and the map's terrain picture (2250x1080) is then the coarsest level alone (135x135 tiles enlarged +// many times): a blocky flash, which the blur hid; zooming out, the new level's tiles also come in a few at a time. The +// game draws a coarsest-level tile under every place in view and a finer one over each that is in (a closest-level +// tile, 3000 pixels or more, over up to four), so a picture whose finer tiles cover fewer places than its coarsest ones +// isn't whole. The last whole picture is kept here and put back on the frames that aren't, for at most MAP_HOLD_MAX in +// a row. +enum { MAP_HOLD_MAX = 60 }; +static struct { VkImage img; VmaAllocation mem; uint64_t serial; VkFormat format; uint32_t w, h; bool valid; } map_hold; +static void map_hold_copy(TexBackend *b, bool save) { + if (map_hold.img && (map_hold.serial != b->serial || map_hold.format != b->format || map_hold.w != b->width || + map_hold.h != b->height)) { + vk_defer_image(map_hold.img, map_hold.mem); + map_hold.img = VK_NULL_HANDLE; + map_hold.valid = false; + } + if (!map_hold.img) { + if (!save) return; + VkImageCreateInfo ci = {.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, .imageType = VK_IMAGE_TYPE_2D, .format = b->format, + .extent = {b->width, b->height, 1}, .mipLevels = 1, .arrayLayers = 1, + .samples = VK_SAMPLE_COUNT_1_BIT, .tiling = VK_IMAGE_TILING_OPTIMAL, + .usage = VK_IMAGE_USAGE_TRANSFER_SRC_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT}; + VmaAllocationCreateInfo ai = {.usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE}; + if (vmaCreateImage(g_vk.vma, &ci, &ai, &map_hold.img, &map_hold.mem, NULL) != VK_SUCCESS) { + map_hold.img = VK_NULL_HANDLE; + return; + } + map_hold.serial = b->serial, map_hold.format = b->format, map_hold.w = b->width, map_hold.h = b->height; + vk_end_pass(); + vk_image_init_layout(vk_cmd(), map_hold.img, VK_IMAGE_ASPECT_COLOR_BIT); + } + if (!save && !map_hold.valid) return; + vk_end_pass(); + VkCommandBuffer cb = vk_cmd(); + vk_full_barrier(cb); + VkImageCopy c = {.srcSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}, .dstSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1}, + .extent = {b->width, b->height, 1}}; + if (save) rec_CmdCopyImage(cb, b->image, VK_IMAGE_LAYOUT_GENERAL, map_hold.img, VK_IMAGE_LAYOUT_GENERAL, 1, &c); + else rec_CmdCopyImage(cb, map_hold.img, VK_IMAGE_LAYOUT_GENERAL, b->image, VK_IMAGE_LAYOUT_GENERAL, 1, &c); + vk_full_barrier(cb); + map_hold.valid = true; +} +RT_ON_RESET(map_hold_reset) { map_hold.valid = false; } + static void draw_(CmdRec *r, bool indexed) { if (profd) prof_tp_ = SDL_GetTicksNS(); ProfZone pz0 = PZ_NOW(); @@ -9201,9 +9245,50 @@ static void draw_(CmdRec *r, bool indexed) { if (!g_settings.depth_of_field && g_cur_fs_hash == UINT64_C(0xf7731492223eb16a)) { stat_skipped++; return; } // Map zoom blur off: as it opens and after each zoom, the world map blurs the screen (1280x720, four passes each // way) and blends that back over the map for about half a second, through a mask and a ramp. Its two blend draws - // are skipped while the map is open (the blur passes themselves are shared with other effects). + // are skipped while the map is open (the blur passes themselves are shared with other effects): known open from the + // screens, or from the map's terrain picture (2250x1080) put on screen earlier this frame (fs c94630386244616e), as + // the screens don't say so on every way into the map. + // Zooming in to the closest level, the blur is blended through that same draw instead: the screen shrunk to 320x180, + // blurred and enlarged to 1280x720, put over the map through a dot mask (192x192) for about 100 frames. + // The game has several programs for that blend (c94630386244616e, d1d87dfe0c81ad63 and more): any draw reading the + // blurred 1280x720 image with a square mask after the map's picture this frame is taken as one. + static uint64_t map_frame = UINT64_MAX, map_target_frame = UINT64_MAX; + static NvnTexture *map_target; // (this frame's only: map_target_frame) + static unsigned map_fine, map_coarse, map_held; // (this frame's places covered: by finer levels, the coarsest) + NvnTexture *rt0 = st.rt.ncolor > 0 ? st.rt.color[0] : NULL; + if (!g_settings.map_zoom_blur && rt0 && rt0->target == 1 && rt0->width == 2250 && rt0->height == 1080 && + pr->fi->ntex > 0) { // (a tile of the map's picture: finer than the coarsest level's 135x135) + NvnTexture *t = shader_texture_object(1, &pr->fi->tex[0]); + if (map_target_frame != renderer_present_count()) map_fine = map_coarse = 0; + map_target = rt0, map_target_frame = renderer_present_count(); + if (t && t->width == t->height && t->width >= 300) map_fine += t->width >= 3000 ? 4 : 1; + else if (t && t->width == t->height && t->width >= 64) map_coarse++; + } + if (g_cur_fs_hash == UINT64_C(0xc94630386244616e) && pr->fi->ntex > 0) { + NvnTexture *t = shader_texture_object(1, &pr->fi->tex[0]); + if (t && t->width == 2250 && t->height == 1080) { + if (map_frame + 1 != renderer_present_count() && map_frame != renderer_present_count()) + map_hold.valid = false; // (the map just opened: not last visit's picture) + map_frame = renderer_present_count(); + if (!g_settings.map_zoom_blur && map_target_frame == map_frame) { + TexBackend *b = vk_tex(map_target, true); + if (b && b->image && b->samples == 1 && b->levels >= 1 && b->layers >= 1) { + if (map_fine && map_fine >= map_coarse) map_hold_copy(b, true), map_held = 0; + else if (map_held < MAP_HOLD_MAX) map_hold_copy(b, false), map_held++; + } + } + } + } + if (!g_settings.map_zoom_blur && map_frame == renderer_present_count() && pr->fi->ntex == 2) { + NvnTexture *t = shader_texture_object(1, &pr->fi->tex[0]), *m = shader_texture_object(1, &pr->fi->tex[1]); + if (t && m && t->width == 1280 && t->height == 720 && m->width == m->height && m->width <= 256) { + stat_skipped++; + return; + } + } if (!g_settings.map_zoom_blur && (g_cur_fs_hash == UINT64_C(0x6da1591e7d7e6726) || - g_cur_fs_hash == UINT64_C(0xdfddd20310007579)) && framepace_map_ui()) { stat_skipped++; return; } + g_cur_fs_hash == UINT64_C(0xdfddd20310007579)) && + (map_frame == renderer_present_count() || framepace_map_ui())) { stat_skipped++; return; } // The bloom's fixed tap offsets must address adjacent console-size texels. // Enlarging those images spaces the taps apart and produces separate copies // of emissive details; odd mip scratch sizes also stopped inheriting scale. @@ -9540,6 +9625,14 @@ static void draw_(CmdRec *r, bool indexed) { memcpy(k.s.blend[i] + 1, st.blend[i] + 1, 6); // (the factors and ops; 0 is the target index, 7 padding) } } + // Map zoom blur off: on a zoom the map's terrain capture (2250x1080) fades the old level's tiles out and the new + // level's in (fs 10e88719ecc264ca, alpha-blended), over the coarsest level magnified many times: the blur seen in + // the zoom. Those tiles are drawn opaque instead (colour only; the capture's alpha is left as it is). + if (!g_settings.map_zoom_blur && g_cur_fs_hash == UINT64_C(0x10e88719ecc264ca) && st.rt.color[0] && + st.rt.color[0]->target == 1 && st.rt.color[0]->width == 2250 && st.rt.color[0]->height == 1080) { + k.s.blend_on &= (uint8_t)~1u; + k.s.write_mask[0] &= 0x7; + } if (ps.mvec >= 0 && (pr->fi->mvec || pr->fi->mvec_still)) k.s.write_mask[ps.mvec] = 0xF; // (mvec.c: only motion and still programs write it) if (ps.mvec >= 0 && pr->fi->mvec_mask) { // (the reactive mask: .z alone, the strongest effect kept) static const uint8_t max_blend[8] = {0, 2, 2, 2, 2, 5, 5, 0}; // (ONE, ONE, MAX: blend_factor, blend_op) From fac6bbdbb83c5b30a8e568f69b1dc87c82ff6ba9 Mon Sep 17 00:00:00 2001 From: Zarigis Date: Thu, 26 Nov 2026 01:52:41 -0800 Subject: [PATCH 3/3] Map zoom blur off: hold the map's picture only through the gap between levels --- runtime/nvn/vulkan/exec.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/runtime/nvn/vulkan/exec.c b/runtime/nvn/vulkan/exec.c index eebd4090c..e2f65d2c6 100644 --- a/runtime/nvn/vulkan/exec.c +++ b/runtime/nvn/vulkan/exec.c @@ -9116,12 +9116,13 @@ static void wait_built(_Atomic int *state) { // (0 building: until built or fai // Map zoom blur off: switching levels, the game stops drawing the old level's tiles a frame or two before the new // level's are in, and the map's terrain picture (2250x1080) is then the coarsest level alone (135x135 tiles enlarged -// many times): a blocky flash, which the blur hid; zooming out, the new level's tiles also come in a few at a time. The -// game draws a coarsest-level tile under every place in view and a finer one over each that is in (a closest-level -// tile, 3000 pixels or more, over up to four), so a picture whose finer tiles cover fewer places than its coarsest ones -// isn't whole. The last whole picture is kept here and put back on the frames that aren't, for at most MAP_HOLD_MAX in -// a row. -enum { MAP_HOLD_MAX = 60 }; +// many times): a blocky flash, which the blur hid. The game draws a coarsest-level tile under every place in view and +// a finer one over each that is in (a closest-level tile, 3000 pixels or more, over up to four). A picture is taken as +// whole when the finer tiles cover as many places as the coarsest, or when the counts have stayed the same for three +// frames (at the widest levels the finer ones never cover the whole view). The last whole picture is kept here and +// put back on the frames where the finer cover fell to under half of that picture's, for at most MAP_HOLD_MAX in a +// row: the gap itself, not the tiles coming in afterwards (the game's own look, a few places at the edges). +enum { MAP_HOLD_MAX = 8 }; static struct { VkImage img; VmaAllocation mem; uint64_t serial; VkFormat format; uint32_t w, h; bool valid; } map_hold; static void map_hold_copy(TexBackend *b, bool save) { if (map_hold.img && (map_hold.serial != b->serial || map_hold.format != b->format || map_hold.w != b->width || @@ -9255,6 +9256,8 @@ static void draw_(CmdRec *r, bool indexed) { static uint64_t map_frame = UINT64_MAX, map_target_frame = UINT64_MAX; static NvnTexture *map_target; // (this frame's only: map_target_frame) static unsigned map_fine, map_coarse, map_held; // (this frame's places covered: by finer levels, the coarsest) + static unsigned map_last_fine, map_last_coarse, map_same; // (the previous map frame's, and frames unchanged since) + static unsigned map_whole_fine; // (the held picture's) NvnTexture *rt0 = st.rt.ncolor > 0 ? st.rt.color[0] : NULL; if (!g_settings.map_zoom_blur && rt0 && rt0->target == 1 && rt0->width == 2250 && rt0->height == 1080 && pr->fi->ntex > 0) { // (a tile of the map's picture: finer than the coarsest level's 135x135) @@ -9268,13 +9271,19 @@ static void draw_(CmdRec *r, bool indexed) { NvnTexture *t = shader_texture_object(1, &pr->fi->tex[0]); if (t && t->width == 2250 && t->height == 1080) { if (map_frame + 1 != renderer_present_count() && map_frame != renderer_present_count()) - map_hold.valid = false; // (the map just opened: not last visit's picture) + map_hold.valid = false, map_whole_fine = 0; // (the map just opened: not last visit's picture) map_frame = renderer_present_count(); if (!g_settings.map_zoom_blur && map_target_frame == map_frame) { TexBackend *b = vk_tex(map_target, true); if (b && b->image && b->samples == 1 && b->levels >= 1 && b->layers >= 1) { - if (map_fine && map_fine >= map_coarse) map_hold_copy(b, true), map_held = 0; - else if (map_held < MAP_HOLD_MAX) map_hold_copy(b, false), map_held++; + map_same = map_fine == map_last_fine && map_coarse == map_last_coarse ? map_same + 1 : 0; + map_last_fine = map_fine, map_last_coarse = map_coarse; + if ((map_fine && map_fine >= map_coarse) || map_same >= 2) { + map_hold_copy(b, true), map_held = 0; + map_whole_fine = map_fine; + } else if (map_fine * 2 < map_whole_fine && map_held < MAP_HOLD_MAX) { + map_hold_copy(b, false), map_held++; + } else map_held = 0; } } }