I am rendering a flower from textures from a spritesheet on screen, and all looks fine. When I use the same textures but not from a spritesheet the flower is rendered differently.
This image (first, below) of the flower rendered from a spritesheet and looks correctly. It is composed of two texture layers: petals and center.
This image (below) of the flower composed from two sprites, one holding petals texture, the other holding the center texture, not from a spritesheet. As you can see, there is transparency around the center, and that is caused by (I presume) blending of center texture onto the petals texture.
The petals and center textures were composed from original images read from files using CCRenderTexture. The original images are PMA (premultiplied-alpha), while the resulting texture from CCRenderTexture is NPMA (non-premultiplied-alpha).
Changing blending modes to PMA or NPMA does not help.
The sprite node hierarchy is simple:
ROOT-SPRITE (empty image, ie 1x1px size, fully tranparent image)
PETALS-SPRITE (petals texture), z=1
CENTER-SPRITE (center texture), z=2
I have the following questions:
What am I doing wrong? How can I resolve this?
Using Cocos2D-X v3.4 in iOS simulator (device has same results).