ios - Applying SKShader to multiple layers -
in game working on, use multiple layers manage background scenery so:
- background
- background obstacles
- foreground obstacles
i using displacement shader create ripple effect, i'm not sure how apply entire background section. each layer individual sknode add different sksprites.
i want ripple effect affect layers, can't apply shader sknode.
you cannot apply 1 shader effect multiple layers, need capture state of other layers making siblings in parent node , capturing output of node, this:
sktexture *capturetexture = [skview texturefromnode:node];
then assign texture 1 node , attach shader node. may not able full fps updates capture approach, may way working.
Comments
Post a Comment