Open SirYodaJedi opened 1 year ago
As of right now, Chaos doesn't support BC6H, but I think that'd be good to implement eventually.
Thanks for the feature request, these are all good ideas!
Update: Apparently no_vtf can decompress compressed HDR and output to EXR or TIFF. Its code can't be ported here because it's an incompatible license (and uses a completely different language anyway), but I figured I'd mention it here since the way it autodetects that a 32-bit VTF is HDR based upon its file name is a neat idea that I've found useful.
Vanilla Source 1, being as it predates the BC6H format for compressed HDR textures, uses a custom format for compressing HDR skyboxes in games like HL2 and TF2, wherein the Alpha channel is used as a multiplicand for converting to BGRA16161616F (the algorithm for this is on VDC's page for the VTF file format). While the OG Vtex can create such textures,
there is currently no tool I am aware of that can decompress the textures back to a normal formatmost tools just treat them regular 32-bit VTFs.I propose Vtex2 be able to convert to and from the esoteric format, as the tool aims to be a complete replacement for Valve's Vtex.
[ ] Be able to convert a BGRA8888 VTF to BGRA16161616F and BC6H, when told by user that the texture uses Source 1 compressed HDR. This will allow proper user-editing of such textures, as well as reduced VRAM footprint in P2CE (as BC6H is a quarter the size of BGRA8888).
[ ] Be able to convert a BGRA32323232F PFM or EXR to Source 1 compressed HDR format, using optional dithering to mitigate color banding. This will bring feature parity to OG Vtex, as well as be higher quality than OG Vtex's implementation (for use in games other than P2CE and Momentum Mod).