Some form of explanation for the formats on the Image page.
If you look at the image documentation page, it has an enum called "Format", and 37 different formats. These aren't explained at all and I have no idea which one I should use in which instance. For example, I am trying to create a custom .exr image but I have no idea which of these pertains to that.
Edit: link
These are Texture Compression Formats.
I looked into the image.cpp and image_etc.cpp but there aren't much comments besides LA8 = LumAlpha8 (Lum = Luminance) and DXT1 = DXT1 RGB8 (s3tc).
But I found some info in the OpenGL ES 3.0 spec:
- RGB and RGBA8 (Pixel Rectangles)
- sRGB on p. 164 (sRGB Texture Color Conversion)
- ETC and ETC2 which is documented in Appendix C.1, p. 288
- BTC can be found in the OpenGL ES 4.5 specs at p. 645 (Appendix C - Compressed Texture Image Formats) and a bit side information is in the OpenGL wiki
- DXT, also called S3TC, can be found in an extension description and also a bit more info in the wiki
- PVRTC and PVRTC2 are not ducumented in the OpenGL spec but a description of the algorithm can be found in Fenney2003
Further reading:
- https://blogs.msdn.microsoft.com/shawnhar/2008/10/28/texture-compression/
- https://www.arm.com/files/event/Developer_Track_5_ASTC-The_Future_of_Texture_Compression.pdf
- http://renderingpipeline.com/2012/07/texture-compression/
- https://www.fsdeveloper.com/wiki/index.php?title=DXT_compression_explained
- https://www.imgtec.com/blog/pvrtc-the-most-efficient-texture-compression-standard-for-the-mobile-graphics-world/
- https://software.intel.com/en-us/articles/android-texture-compression-a-comparison-study-with-code-sample
- https://docs.unity3d.com/Manual/class-TextureImporterOverride.html
- https://www.khronos.org/registry/DataFormat/specs/1.1/dataformat.1.1.html
Wow, this is really helpful, thank you! I ended up using FORMAT_RGBAF, since that gave 32 bits of data per color channel, which worked great, but I'm sure your comment would be extremely helpful for anyone else who is working with custom images in Godot. Thank you again!
You are welcome. And you are totally right that this should be documented somehow. Thanks for pointing this out.
Is godotengine/godot#17399 good enough to close this out @najarvis / @pwab?
Looks great, thank you for this!