Hello to all
I want to use the ETC1 compression format for spine animations and improve performance on Android platform, but I can’t add an alpha channel to the texture.
A little search by code revealed the ability to attach a file with an alpha channel using the suffix “@alpha”.
I compress “sleleton.png” animations texture file using TexturePacker in 2 files - “skeleton.pkm” for RGB and “skeleton.pkm@alpha”.
Suffix great works with objects of the Sprite class(i use create() method), but does not work for “spine::SkeletonAnimation”. What can I do about it?
auto tmpSprite = Sprite::create(animDir + “skeleton.pkm”);
auto tmpSk = spine::SkeletonAnimation::createWithJsonFile(animDir + “skeleton.json”, animDir + “skeleton.atlas”);
tmpSk->setAnimation(0, “static”, true);
tmpSk->setPosition(center + Vec2(500, 0));
On the left is the Sprite (from the animation atlas)
On the right is the spine::SkeletonAnimation, there is no alpha channel
Cocos2dx version 3.17
The debugger checked that when loading animation textures, the setAlphaTexture method is called for them. But obviously, this is not enough.