godot
godot copied to clipboard
Betsy: Implement BC4 compression
Adds support for BC4 / ATI1 / RGTC_R compression to Betsy. This is a prerequisite for BC3/BC5, since they use a separate BC4 block for storing their uncorrelated alpha and green channels respectively. In terms of performance, it is comparable to etcpak.
TODO:
- [x] Add a testing project,
- [x] Document the changes.
Future work:
- Add BC3 and BC5,
- Convert RGB-RGBA on the GPU,
- Optimize mipmap compression,
MRP: betsyrgtcr.zip
@Calinou How do I queue this to run on the benchmark servers? Also can you take a look?
How do you get a texture to import as BC4 in Godot? I've tried to import a grayscale PNG and a RGB PNG that only has a red channel (green/blue are fully black as confirmed in GIMP). However, both are imported as DXT1 with VRAM compression or BPTC RGBA with high-quality enabled (neither have an alpha channel).
How do you get a texture to import as BC4 in Godot? I've tried to import a grayscale PNG and a RGB PNG that only has a red channel (green/blue are fully black as confirmed in GIMP). However, both are imported as DXT1 with VRAM compression or BPTC RGBA with high-quality enabled (neither have an alpha channel).
BC4 only works with red only images with the channel packing set to optimized
Thanks!