-
Notifications
You must be signed in to change notification settings - Fork 11
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
ATF ETC2 Format texture does not work on some Android devices #30
Comments
ETC2 doesn't display on using AIR/starling I made a quick Unity apk with images with ETC2 compression. This works on the android device from above. |
Here's an AIR 22 apk The ETC2 does not show up on the device but does show on the simulator. |
Further tests indicate that there's something wrong in many cases when using ETC2. Here is a zip file with ATF textures using ETC2 exclusively, with and without alpha channel / with and without mipmaps: atf-etc2-samples.zip The file also contains
The outcome:
|
Awesome work Daniel. I think we now have more than enough data to submit proper bug to the Adobe. |
Indeed! I'm already in contact with Adobe about this issue. 😄 |
Guys, any news about this issue? |
Daniel said that Adobe is working on this and that they are making progress. I would also like to see this be fixed. Also I wish they fix bug with hidden string allocations on iOS when assigning Vectors to Object or Dictionary Bug Report. Please vote if you haven't already |
I started another inquiry about the progress — will post here when I know more! |
Sorry Daniel I do not understand. What does it mean that you started another inquiry? Does it mean that you are investigating the issue by yourself or that you have another conversation with Adobe about the progress. Thanks |
What I meant was simply to write them an email and ask for the latest status. 😉 |
Wow awesome. I hope they fix all the issues. We are so close to have a really solid AIR SDK that works good for Android and iOS just need a little more polishing and bug fixes :) |
AIR 30 should fix most of these problems! ✨ ETC2 textures now load fine in my tests, if you follow a few rules:
Furthermore, it's important to know how this was implemented by Adobe:
In other words: new devices (with OpenGL ES 3 support) will use software decoding for ETC1 textures. Thus, my recommendation for Android is to always bundle ETC1+2 together in the ATF textures for Android. I think all those limitations are not really problematic — what's important is that ETC2 textures are now finally really usable on Android! Please, anyone, give this a try and let me know how it goes. 😄 |
@PrimaryFeather this is what i see in release notes for AIR SDK 30
|
@PrimaryFeather, thanks for your response!
|
I answered some of the questions in detail here, but I'll repeat it here, for reference:
I hope that helps! |
I have tested ETC2 on Android with my game and everything seams to be fine. So I am now using ETC2 only and without JRX. I do not know what is JRX? Should I use that? |
@hardcoremore, ETC2 + JRX has known issue on Android with AIR SDK 30. When Adobe fixes it, you should use it, as it keeps the textures compressed, thus the size of ATF is much smaller. When you create your APK it gets to the same size as the same compression is applied on all files added into APK. But when the app is installed APK is unarchived, means your textures can become 100MB on the device instead of being 15MB with JRX compression. |
One more thing: apparently, JRX does work for textures without alpha. So for a specific type of images (e.g. background images or photos), you can safely enable JPEG/XR. I tested this on an Android phone that does show the artifacts for alpha textures; and it was mentioned in the email I got from Adobe (but I only noticed that just now). |
Thanks for letting us know @PrimaryFeather! But We expect Adobe to fix this asap in next, hopefully coming soon SDK version. |
In today's release AIR 31.0.0.85 Adobe fixed: ETC2 Non Alpha ATF are not rendered in ADL (FLASH-4190225) |
Ah, that's great news! Downloading AIR 31 now — I'll test if I can confirm the fix and will report back. |
[Forget my previous message. I thought they'd fixed the JXR issue, but it's just about ADL.] |
Yes, the ADL issue is fixed! 😄 JXR compression still doesn't go well with transparency, but that's another story. |
Found out about this only now just before release :( @PrimaryFeather did you mean to detect "Standard" and above or "Standard Extended" to use ETC2 safely? (On another forum post you wrote: Actually, I had expected that any device supporting "Standard" or above would support ETC2. 🙁 ). |
Here's the code I'm using to detect the best supported compressed texture format: private static function getOptimalAtfFormat():String
{
var fallbackFormat:String = SystemUtil.isIOS ? "pvrtc" : "etc";
var currentProfile:String = Starling.painter.profile;
var profilesNotSupportingEtc2:Array = [
"standard", "standardConstrained",
"baselineExtended", "baseline", "baselineConstrained"];
return profilesNotSupportingEtc2.indexOf(currentProfile) < 0 ? "etc2" : fallbackFormat;
} However, you don't necessarily need to use PVRTC, because "etc" also works well on all iPhones. However, PVRTC yielded a little better image quality in my tests. Also, don't forget that for transparency, you cannot use JXR compression in ETC2 — or at least you couldn't when I last tested it, maybe they fixed that in the meantime! A quick test with the latest AIR version will verify this. I hope that helps!! |
Thanks @PrimaryFeather ! That was insanely fast response, and on Easter :D Ok so I should go for Standard Extended for ETC2 looking at your source? It is a tiny bit confusing because in a cached Adobe doc I found they write this: Mobile platform "The “Standard” profile requires OpenGL ES 3.0 on mobile platform. Nowadays, there are many high-end smartphones and tablets that have support for OpenGL ES3.0, (iPhone 5S, iPad Air, Samsung S5, Samsung Note3, etc.)". Which would imply that Standard is always OpenGL ES 3.0 and ES 3.0 should support ETC2? Or is it really just "standard extended"? I'm targeting Android only with this build, so I can ignore PVRTC I think? And yep I'm aware about that whole JXR +transparency :/ All of my atf's have transparency, so I'm going for uncompressed ETC2 + JXR/LZMA compressed ETC1, bundled in separate ATF files. That seemed like a good compromise, saw you suggesting it elsewhere. |
Yes, it's quite confusing from looking at the docs, I had the exact same problem. 😉 So I specifically asked someone from Adobe and got this response:
So that explains it: when OpenGL ES 3 is supported, Stage3D runs in "Standard Extended", and then ETC2 support is guaranteed. All the best, and happy Easter! 😄 |
Thanks, its all clear now! Happy Easter ! :D |
So, the combination of ETC2 and JXR + A it is still an issue on Android. The AIR implementation of JXR decompression of ETC2 must have some fault. It is a huge drawback on highly graphic intensive apps. My current project ( graphic novel ) needs that fixed. please. |
Hi @llorenzo - I've only just seen this issue and have just read through it. Would it be possible to get a test case for this ETC/JXR/Alpha issue? I know from experience that the ATF handling within AIR is insanely convoluted due to the masses of different combinations and permutations of formats that are available and may be supported, but this may be something we can look into .. thanks |
Hi Andrew, thanks for coming by. All I know is from this and other threads in the Starling Forum. It has been reported by Daniel and others and there is no official fix reported. For what I understand, it happens on some Devices. https://forum.starling-framework.org/d/19374-atf-png2atf-with-texture-compression-r-is-unusable-on-some-android-devices |
When compiling with AIR SDK 27 ATF textures that include ETC2 only compression format will not display at all on some Android devices. On iOS everything is working fine.
I am using latest Starling 2.2
Currently ETC2 textures will not display on following Android devices:
Samsung s6 Edge.
Huawei P10 Lite
Samsung Glaxy Tab 3.
However ETC2 textures will be displayed on the following Android devices:
ZTE Blade A910 with Android 6
The text was updated successfully, but these errors were encountered: