-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove DDS_INDEXED
from DDSFormat
#80669
Remove DDS_INDEXED
from DDSFormat
#80669
Conversation
Do you have access to any test assets which can help us test if this change is correct? Ideally in the form of a minimal reproduction project (MRP) which is a zip of a new project with the assets in it that reproduce the problem. Are there any implications of changing the enum: will this break compatibility of any assets already imported into Godot 4.0 or 4.1? |
Added a MRP. The file tulips.dds is an l8 grayscale image, which gets imported as l8a8. |
As for breaking compatibility, this PR only affects l8 and l8a8 dds importing, however the imported images used to be broken, so it shouldn't matter that much. |
Additionally, attempting to load grayscale-alpha images such as dice_l8a8.dds (inside of dice_l8a8.zip) fails on v4.2-dev3 due to reaching outside of the Format Info array's boundaries: This PR also fixes that issue: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change makes sense. It is clear that DDSFormat
needs to line up with the entries in dds_format_info
DDS_INDEXED
from DDSFormat
Thanks! And congrats for your first merged Godot contribution 🎉 |
Edit: MRP ddsfix.zip
The DDS_INDEXED value within DDSFormat has been redundant since around 3.0. At one point this value used to correspond to an entry in the Format Info array, however, that entry got removed while the enum value remained.
This causes some textures to be imported incorrectly (e.g. L8 as L8A8) due to incorrect array indices.