SKEmitterNode, how to maintain the same effect in blend mode "add" to different backgrounds

I have a really cool effect that I like what I did using the sks files in xcode and in blend mode "add". Now I did not understand this at that time, but, looking at the documents of the apple, I saw that the effect is actually based on the background color, in particular:

Adds pixel values ​​of the particle and main images. Creates a white pixel if this value is greater than 1

Now I want to have the same effect for each background color, but as far as I know, the only way to do this is to use the Alpha blend effect. But it only gives me the opportunity to have solid colors. This is the graphic that I want to apply in all different background colors:

enter image description here

How can I use this effect for all background colors? I use the default particle search file.

UPDATE:

I leave this question unanswered until a single apple finds a way to do what I want, or someone else finds a way to do it.

+6
source share
1 answer

Due to the unique nature of AND particle systems with the very limited SpriteKit masking tools , I don’t think it can be done.

The accessibility of inversion masking, thus, that non-classical masking in SpriteKit, as we know it now, will instantly solve this problem.

A way to do this, usually without masking the inversion, would be to have two instances of the same particle system, one of which acts as a mask to cut out the extra black color, one visual element that you see above black is then arranged (in overall) to your background.

Here, KnightOfDragon suffers from the identity of particle systems for another use case: Duplication of the particle emitter effect in a Sprite set

+2
source

Source: https://habr.com/ru/post/1012068/


All Articles