Result of BlendFunc {GL_ONE, GL_ONE} is weird. (Cocos2d-x 3.0 Alpha 1)

Result of BlendFunc {GL_ONE, GL_ONE} is weird. (Cocos2d-x 3.0 Alpha 1)
0.0 0


When I use BlendFunc {GL_ONE, GL_ONE} in Cocos2d-x 3.0 alpha1,
I can see white area if there are alpha transparent area in image file(PNG).
Is it bug?


Bug. I have this bug too, add the ParticleFire and set GL_ONE.


I think there are some bugs on Cocos2d-X 3.0 alpha1’s BlendFunc.
Not only “Linear dodge” but even “Multiply” is weird too.




same here, anyone any idea to solve this?


I’m using 3.3 rc0, and alpha blending on Win32 and Android looks fine, but on iOS it looks wrong.
An image that is supposed to fade in/out has weird “jumpy” behavior when it starts fading in. When it’s close to being almost fully transparent, it kinda flickers.

I’ve seen the same bevahior before on Android and Windows when using GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA.

Are you guys seeing the problem on all targets, or also on a specific one (like iOS for me)?


Haven’t tested on android yet. currently i have problem on iOS, if I have something with alpha channel (has some transparent area), and using {GL_ONE,GL_ONE}, or {GL_SRC_ALPHA,GL_ONE} for shining effect, then I will get whole white area.


Btw, on iOS 8.1 my alpha seems fine again.
I didn’t change anything in my graphics code, and now the alpha is blinking correctly again…

Maybe an iOS 8 issue then?


so you are using GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA not GL_ONE,GL_ONE right?


I’m using the default one set by cocos itself, not sure which one that is.
I only set my own (to overwrite the default cocos setting) when I want to do special blending, like illuminate.


yes, so for illuminate you use what?


For illuminate I use: GL_DST_COLOR, GL_ONE

I never set GL_ONE, GL_ONE myself for anything by the way, I just checked my code…
So unless that is the default, I don’t use it at all.


if I use your setting I will get whole white area : (

currently I can only use SRC_ALPHA,GL_ONE, but not look very good


Hi everyone,

I would like to draw on an image using DrawNode, the rules are as following:

  • Do not draw on transparent parts(like “Lock Transparent” in Photoshop)
  • Do not override on dark parts, for example: after drawing we still can see black lines(like Multiply in PhotoShop)

I’ve tried using BlendFunc on DrawNode but unlucky.

Somebody help me. Thank you in advance.