I completed the ATF(ETC2) texture test on a Samsung phone, not on Adobe AIR mobile.
Ah nice work @oni. Iâd been fiddling around with that but hadnât had any luck yet. Iâll have a go with what youâve shared, thanks ![]()
On iOS, I like practical ASTC texturesďźGitHub - rainyt/hx-astcenc: Create ASTC format texture file. And OpenFl Target ASTCBitmapData.
This applies to direct use of OpenFL.
I used Adobeâs official atftools to create ATF files, and I believe the alpha channel of the ATF (ETC2) created by this tool has a problem. Flash runtime will automatically use ATF (JPEG-XR) on devices that do not support ATF (ETC2). If targeting platforms other than Flash, I suggest using ASTC instead of ETC and BPTC (bc7) instead of DXT.
What container are you using for ASTC and BC7?
I managed to get success with ETC2 on my Android phone, with the following code adjustment:
succeed?
Have all systems and goals been supported?
I can confirm that in my testing, I now have ETC2 support under the Android with the html5 target.
I have not tested iOS.
In theory though, if this is fully successful, it should provide GPU texture compression supporting alpha, to a wide range of desktop (via existing DXT) and mobile devices (via now supported ETC2).
I donât have the means to widely test this though, so itâs best to remain reserved about how successful this might be for now.
How did you achieve it? Have you modified the internal code of âopenflâ? Will this lead to other issues?
I modified openfl.display3D.textures.TextureBase. You can place that file in your project under src\openfl\display3D\textures\TextureBase.hx and it will override the native OpenFL TextureBase.hx file, if youâd like to try it.
Iâve submitted this as a pull request to the project, but keep in mind, that pull request is still subject to scrutiny and testing, and may not be accepted.
At the very least though, the issue has been flagged, so hopefully a resolution eventuates, one way or another.
Feel free to test and provide feedback ![]()
Good morning, may I ask if you have resolved the method of using âATFâ on all systems and targets?
What I sought to resolve above in my PR, was absent checks for ETC2 support. Some wider testing will hopefully confirm if thatâs worked for a broad range of devices, including iOS devices. Iâve only tested on my Linux desktop against native and html5 targets, and Android phone against the html5 target. Please feel free to give it a go and report your findings.
I would suggest that all going well with that fix, ATF should hopefully work (with alpha) on all systems and targets that support DXT5, PVRTC and ETC2. For any device made within the last decade, I suspect thatâs a safe assumption.
- DXT5 is supported by Windows desktop since 2002 and OSX since 2009.
- PVRTC support was supported by iOS devices since their beginning in 2007.
- ETC2 support was introduced to Android in 2013 and iOS in 2014.
Keep in mind, for the widest range of support from a single web application, youâd need to include all of those formats in your ATF. Iâd suggest that in most instances, DXT5 + ETC2 is probably sufficient unless you want to also support very old iOS devices.
Iâve not mentioned ETC1 because of itâs lack of alpha, which I expect youâll need.
Yes, âalphaâ is necessary
No idea if relevant or useful but hxRectPack2D supports some TexturePacker.
and JustGraphix my collated lib should have this now or in time.
Very sorry if I am not following detail etc.. my day job currently is more practical these days ( construction industry ) as found getting back into code as an âold-yâ hard when flash died. But lets be clear texture packer is not rocket science it is better open, lets keep solutions and perhaps even tools as optionally opensource.
I have a question. Since ATF has advantages, why do modern game engines use PNG instead of ATF
ATF is a format developed by Adobe for Flash Player and AIR. I doubt that Adobe put any effort into promoting it for the wider game development community. Especially since they arenât working on enhancing the ATF format anymore. Many in the wider game dev community are probably completely unaware of ATF.
However, itâs also worth mentioning that there are other texture container formats that are similar to ATF. For instance, KTX:
As @joshtynjala mentioned, ATF is Adobeâs proprietary container format. Itâs in the name: Adobe Texture Format. The format is not an open one, so it wasnât widely available, or adopted (except via Flashâs once upon a time wide adoption).
The texture compression formats it can contain though are widely adopted and used by modern game engines: DXT1/5, ETC1, ETC2, PVRTC.
The difference is the container used. So itâs not typically ATF, but it would be something that achieves a similar thing, such as DDS (DirectDraw Surface), or KTX @joshtynjala mentioned, which is arguably the most similar to ATF (KTX v1 at least) and is an open format (see my PR here).
Thank you for your answer. Is there a recommended texture compression format for openfl? Require support for all systems and all objectives
By the way, do you still need to release goals for âFlash Playerâ and âAirâ now?
