mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-03 12:57:27 +00:00
Texture format 43 holds unsigned floats of 10 bits (R, bit 0), 11 bits (G, bit 10) and 11 bits (B, bit 21). VK_FORMAT_B10G11R11_UFLOAT_PACK32 holds R11 at bit 0, G11 at bit 11 and B10 at bit 22, so storing the guest R field in the Vulkan B field and the guest B field in the Vulkan R field moves every texel without changing a bit of any component. A sampled texture of format 43 is now uploaded that way (a repack pass over the detiled words, TextureRepack.comp) and viewed with R and B swapped back (TextureComponentChannel), so the shader samples it natively: point and bilinear filtering, every mip level and LOD, and cube faces work as for any other float texture. A texture whose results a storage image still holds is copied from that image (vkCmdCopyImageToBuffer, the repack pass, vkCmdCopyBufferToImage) and copied again whenever the image changed, like the depth and block copies. The recompiler treats a sampled format-43 image as a float image without conversion; storage reads and writes keep the packed R32_UINT path, and a 3D texture whose results are still in a storage image is flushed and uploaded instead. PPSA01317 samples a mipmapped format-43 texture at a LOD other than 0 and a format-43 cube map during boot. AI-assisted: yes