How to use Blend Factors to create the following effect

How to use Blend Factors to create the following effect

I am trying to use Blend Modes (NOT MASKS) to create hole in sprite.
For example (I attached an image):


The white sprite is the background and the other sprite (the red one) is the Hole that i want to create.
What I need is a transparent area where the hole is standing (I dont want to see the hole at all. I just want to use it to make transparent effect).

Final effect (result):
The red sprite (hole) should disappear and instead we should see the blue/purple background.

1 Like

Hello all - to help clarify @hananht 's post, this is the effect we are looking for (assume the white background to be transparent, i.e., could include animations):

In the documentation of sprite:

Under the section of “Sprite Properties”, There is a property called “Dst Blend Factor” which has a some sort of reference link to a web GL test page:

In the web GL test it works fine but in cocos creator the blend mode acts differently for some reason.
This is my setting that I wish to accomplish:

@jare, can you ask someone to take a look at this, please.

Thanks, @slackmoehrle, this is greatly appreciated!

Any news about this one?

I know the team has been really busy with the next Creator release coming in a few days. I’ll remind Jare to ask someone to take a look.

Sorry, you mis-understood the blending effect.
If you cull out the red hole, then the application will not render anything, which leads to a black or white color (depends on platform) in the hole.

If you want to display a purple background in the hold, just use Mask component with Inverse enabled.

Thank you @jare

But why in the sample it can show a transparent background?

Any way, I will use mask instead

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.