-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Refactor high quality texture import #72031
Refactor high quality texture import #72031
Conversation
3069bce
to
04b31d5
Compare
04b31d5
to
6097a47
Compare
5bae6e5
to
dc5cdf4
Compare
I'm getting a crash when loading a scene. I deleted the
|
@clayjohn The crash and error seem unrelated to the PR, which is very strange. This PR forces the reimport of all textures, so it may be related to that? |
dc5cdf4
to
5ad04e1
Compare
I'm not sure. I am testing on https://github.com/Rytelier/Godot-4-forest-benchmark and I can reliably reproduce the crash if I delete the I also tested with https://github.com/gdquest-demos/godot-4-3d-third-person-controller and it did not crash Edit: Turns out in my testing project I had left "Import ETC" disabled. If I enable "Import ETC" I can reproduce the crash on master, so it is not caused by this PR |
Couple notes:
It looks like the image size validator doesn't properly account for ASTC Lines 79 to 81 in a43db5a
Need to add them to the end:
|
Here is the error log from running on an android device:
Running on a Pixel 4. The scene is just the default icon on a Sprite2D taking up most of the screen. The icon is set to use high quality import. and only "ETC ASTC" import is enabled in the project settings (edit: same results if both "S3TC BPTC" and "ETC ASTC" enabled in project settings) edit edit: Tested on Vulkan backend, same result. The project won't load and I get the above error endlessly. Unchecking the "high quality" flag on texture import makes the project work |
eeb9353
to
12c6d5f
Compare
@clayjohn Fixed some problems in the ASTC implementation, so hoping it works now. I can't manage to load ASTC on desktop (Godot does not recognize the format for some reason). |
Same error as before. The file it is referencing exists, its almost like its not getting included in the APK though. Do we have logic that selects what imported resources are included in the APK?
|
* Only two texture import modes for low/high quality now: * S3TC/BPTC * ETC2/ASTC * Makes sense given this is the general preferred and most compatible combination in most platforms. * Removed lossy_quality from VRAM texture compression options. It was unused everywhere. * Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA). * Changed MacOS export settings so required texture formats depend on the architecture selected. This solves the following problems: * Makes it simpler to import textures as high quality, without having to worry about the specific format used. * As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
142969f
to
28f51ba
Compare
@clayjohn Okay that took me a couple of hours to figure out, but it should be working well now. Make sure to test, but I tested on AMD (which supports ASTC) and it works fine. |
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.
Looks good to me. I would merge ASAP to get it properly tested in beta 17, as I expect bugs on different platforms :)
I'll wait to see if @clayjohn can at least confirm it works on his Android device.
@akien-mga I think its safe to merge at this point, seems to work well enough for me. |
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.
Looks good to me. After re-importing and re-exporting with the newest changes this seems to work on Android both in mobile and gl_compatibility
Dumb question but this has a visual impact? |
Yes, same as switching from s3tc to bptc in current betas. There won't be a visual change in the default case though |
Thanks! |
This is now required after godotengine#72031 when using HDRs. Could have further cleanup as I think these import options may not be needed at all anymore, and etc/etc2 support doesn't seem to make much sense. Likewise, the hardcoded "s3tc" in `get_platform_features` could maybe be removed. But this is material for after 4.1. Fixes godotengine#73789.
This is now required after godotengine#72031 when using HDRs. Could have further cleanup as I think these import options may not be needed at all anymore, and etc/etc2 support doesn't seem to make much sense. Likewise, the hardcoded "s3tc" in `get_platform_features` could maybe be removed. But this is material for after 4.1. Fixes godotengine#73789.
This solves the following problems: