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:
co-authored by
Claude Opus 5.5
parent
c5b709d38d
commit
01cc252a1d
@@ -105,8 +105,14 @@ VulkanWindow::GpuTexture& VulkanWindow::get_gpu_texture(
|
||||
decoded = decode_texture_bytes(mtra.data(), mtra.size());
|
||||
}
|
||||
} else {
|
||||
// PORT: the phone magnifies the 600-high 40250 UI about 1.8x, so the 1x window art and icons
|
||||
// look soft. A UI texture found in hd_ui.pak (scripts/build_hd_ui.py) is uploaded at 2x in
|
||||
// place of the pack file. The engine keeps the 1x size from its own decode for layout and
|
||||
// quads, and the UVs are normalized, so only the texel density changes.
|
||||
std::vector<std::uint8_t> pack_bytes;
|
||||
if (read_live_pack_texture(texture_name, pack_bytes))
|
||||
if (read_hd_ui_texture(texture_name, pack_bytes))
|
||||
decoded = decode_texture_bytes(pack_bytes.data(), pack_bytes.size());
|
||||
if (!decoded.ok() && read_live_pack_texture(texture_name, pack_bytes))
|
||||
decoded = decode_texture_bytes(pack_bytes.data(), pack_bytes.size());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user