Host: 2x UI textures from hd_ui.pak (AI-upscaled 40250 UI art)

The phone magnifies the 600-high 40250 UI about 1.8x, so the 1x window art
and icons look soft next to the oversampled text. scripts/build_hd_ui.py
upscales every UI image the zh client loads (d:/ymir work/ui/, icon/,
locale/zh/) with realesrgan-x4plus, reduces it to 2x and back-projects the
residual so the board grain the network denoises away comes back; the host
uploads a texture found in hd_ui.pak in place of the pack file. Layout,
sizes and UVs stay the engine's 1x ones. MT_HD_UI=0 disables it; the pak
(135 MB, Ymir art) is built into the client dir and synced to the phone,
never committed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-30 20:04:46 +09:00
co-authored by Claude Opus 5.5
parent c5b709d38d
commit 01cc252a1d
6 changed files with 354 additions and 9 deletions
+3 -1
View File
@@ -88,7 +88,9 @@ def local_files(client, locale):
path = Path(dirpath) / name
files[path.relative_to(client).as_posix()] = path
for path in client.iterdir():
if path.is_file() and (path.name == "channel.inf" or (path.name.startswith("locale") and path.suffix == ".cfg")):
# hd_ui.pak: the 2x UI textures of scripts/build_hd_ui.py, when built (src/host/texture_decode.cpp).
if path.is_file() and (path.name in ("channel.inf", "hd_ui.pak")
or (path.name.startswith("locale") and path.suffix == ".cfg")):
files[path.name] = path
if locale:
cfg = client / f"locale_{locale}.cfg"