Add support for importing R8 and R8G8 DDS textures#116307
Conversation
|
@BlueCube3310 If you have time, can you take a look? |
|
I've looked around at other DDS loaders, and it looks like R8 and RG8 are both nonstandard formats. For instance, GIMP and Paint.net (DirectXTex) read an R8 file as L8, but both will fail when given an RG8 file. On the other hand, NVIDIA Texture Tools can properly read both files. |
|
The We should probably make case DXGI_R8_UNORM:
case DXGI_A8_UNORM: {
return DDS_LUMINANCE;
}It also looks like case DXGI_R8G8_UNORM: {
return DDS_LUMINANCE_ALPHA;
}If you have any suggestions for how to accommodate both |
|
I think it's fine to map the DXGI R8/R8G8 to |
|
I've mapped |
|
Could you squash your commits? See our pull request guidelines for more information |
|
Squashed |
|
Thanks! Congratulations on your first merged contribution! 🎉 (PR is merged, GitHub is being slow to update) |
Closes godotengine/godot-proposals#14231 by adding support for importing R8 and R8G8 DDS textures. I've implemented the conservative approach outlined in the proposal so when a non-FourCC DDS texture is imported it must either be in R8 or R8G8 (G8B8 or B8R8 will not work).
I've tested this by importing both non-FourCC style DDS textures (RGB Bits), and by importing DX10 style DDS headers which use DXGI Enums.
Let me know your thoughts on whether the conservative or greedy approach outline in the proposal should be used here for non-FourCC textures.