It’s my first time posting, so please let me know if I broke any forum rule or something. I will update/fix.
Recently some users of our app are reporting images not showing correctly. After some digging I found out it was ClippingNode not working as expected on the following devices with Android 9 (Pie).
Moto g(6) Play
Samsung Galaxy J4+
Samsung Galaxy J6+
One thing in common among them is they are all using Qualcomm Adreno 308 GPU.
Attaching two images: same code with different devices: Pixel 2 and Moto g(6) Play.
And here’s the code I’m using for the test above.
auto clippingNode = ClippingNode::create(); auto cloud = Sprite::create("cloud.png"); clippingNode->addChild(cloud); clippingNode->setStencil(Node::create()); clippingNode->setAlphaThreshold(0); addChild(clippingNode, 10); clippingNode->setPosition(getContentSize() * 0.5f); auto brush = Sprite::create("brush.png"); clippingNode->getStencil()->addChild(brush);
I’m wondering if anyone is having similar issues. Any suggestions / guides will be appreciated. Current cocos2d-x we are using is 3.16, but I have tried upgrading it to 3.17.2, which didn’t help.