xray-16
xray-16 copied to clipboard
BC7 compression for dds
BC7 much better DXT5, it would be nice to add it.
R4 now uses DirectXTex to load textures. That means, it supports BC7 now.
Update: I just successfully tested BC7 support and it is confirmed.
I'll use this issue as a general task for all BC1-7 formats.
Task list:
- [x] DirectX 11
- [x] Use DirectXTex to load textures. (supports all BC formats)
- [x] ~~DirectX 9~~ has been deprecated (#468)
- [x] ~~BC4/BC5 is also known as ATI1/ATI2. Check if ATI formats are supported and load as-is, or convert to DXT.~~
- [x] ~~Convert BC6H/BC7 to DXT or ATI.~~
- [ ] OpenGL
- Check if corresponding extension is supported and convert it to other format if not.
- [ ] BC1-3 (aka DXTn)
- If this is not supported, all we can do is to just decompress the texture and load it in an uncompressed format.
- https://github.com/KhronosGroup/OpenGL-Registry/blob/main/extensions/EXT/EXT_texture_compression_s3tc.txt
- https://github.com/KhronosGroup/OpenGL-Registry/blob/main/extensions/EXT/EXT_texture_compression_dxt1.txt
- https://github.com/KhronosGroup/OpenGL-Registry/blob/main/extensions/ANGLE/ANGLE_texture_compression_dxt.txt
- [ ] BC4-5 (aka ATI1-2)
- https://github.com/KhronosGroup/OpenGL-Registry/blob/main/extensions/ARB/ARB_texture_compression_rgtc.txt
- https://github.com/KhronosGroup/OpenGL-Registry/blob/main/extensions/EXT/EXT_texture_compression_rgtc.txt
- [ ] BC6H/BC7
- https://github.com/KhronosGroup/OpenGL-Registry/blob/main/extensions/ARB/ARB_texture_compression_bptc.txt
- https://github.com/KhronosGroup/OpenGL-Registry/blob/main/extensions/EXT/EXT_texture_compression_bptc.txt
Useful links:
- https://github.com/microsoft/DirectXTex/wiki/Decompress
- https://github.com/microsoft/DirectXTex/blob/main/DirectXTex/DirectXTexDDS.cpp#L60
- https://github.com/wine-mirror/wine/blob/master/dlls/wined3d/utils.c#L1475
- https://github.com/dolphin-emu/dolphin/pull/5834/files
- https://www.khronos.org/opengl/wiki/S3_Texture_Compression