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
+9 -1
View File
@@ -4130,7 +4130,15 @@
"focus_pause_exit_cleanup": "PARTIAL"
},
"platform_adaptations": [
"Godot mobile touch/joystick/pinch/landscape UI is a platform adaptation and has no direct Windows 40250 branch to compare 1:1."
"Godot mobile touch/joystick/pinch/landscape UI is a platform adaptation and has no direct Windows 40250 branch to compare 1:1.",
{
"reference": "CGraphicImageTexture loads the UI images (d:/ymir work/ui/, icon/, locale/<locale>/ui) from the packs at their 1x size; 40250 draws them 1:1 on an 800x600+ desktop",
"implementation": "src/host/vk_textures.cpp get_gpu_texture -> src/host/texture_decode.cpp read_hd_ui_texture: a UI texture present in hd_ui.pak (scripts/build_hd_ui.py, realesrgan-x4plus + back-projection, 2x) is uploaded in place of the pack file; MT_HD_UI=0 disables",
"invariant": "only the GPU texel density changes: the engine's own decode, the image sizes, layout, quads and normalized UVs stay the 40250 1x ones; a name absent from the pak falls back to the pack",
"tests": [
"real server 192.168.21.203 shop + character window A/B 2026-09-30 (MT_HD_UI=0 vs 1, 600-high UI at ~1.7x): identical layout, icons and portrait sharper, board grain kept; 2406 textures, 135 MB pak"
]
}
],
"evidence": {
"contract": "audit/contracts/ui.input-camera-mobile.md",