ios - Applying SKShader to multiple layers -


in game working on, use multiple layers manage background scenery so:

  1. background
  2. background obstacles
  3. 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

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -