One Material Shader using multiple sprites

One Material Shader using multiple sprites


When I create a Material shader I can only get the effect on ONE single node that has a cc.Sprite component on it. That’s works fine, but I would like to have one shader that affects all underlying node’s sprites like this:

An example would for example to have these 3 sprites working together as “one image” the same wave shader as in the image below.
In this screenshot I have applied the same wave shader 3 times, once on each image to accomplish this. As you can see the Cocos logos are cutting out of their node and are not working as one big image that has a shader applied on it.

You might say, “why not create one image with all the images you want on it”. This doesn’t solve my issue, since I want it to be dynamic, for each frame. I want to be able to animate and move the sprites around, while still being affected by the one single “master shader”.

This would be super cool, but I haven’t seen any solutions anywhere and been thinking about it for a long time how useful it actually would be.

Any tips? Thanks!

1 Like

Bump, is this possible @jare?

Why not use RenderTexture?