Skip to content
This repository was archived by the owner on Jun 22, 2025. It is now read-only.
This repository was archived by the owner on Jun 22, 2025. It is now read-only.

[Feature] Handling compressed BGRA8888 HDR textures #24

@SirYodaJedi

Description

@SirYodaJedi

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 format most 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions