4

I've read that some of the downfalls of SpriteKit is that you're unable to develop shaders if you use it.

However, I read a post here on SO that suggest otherwise:
How to apply full-screen SKEffectNode for post-processing in SpriteKit

Can you develop your own shaders if you decide to use SpriteKit?

Thanks

Community
  • 1
  • 1
Oscar
  • 1,025
  • 2
  • 15
  • 25

2 Answers2

4

It is not supported in iOS 7, but iOS 8 will support custom shaders. For more information, view the pre-release documentation of SKShader.

An SKShader object holds a custom OpenGL ES fragment shader. Shader objects are used to customize the drawing behavior of many different kinds of nodes in Sprite Kit.

CloakedEddy
  • 1,965
  • 15
  • 27
  • I was not able to find working example code for a SpriteKit shader, so I created this small example and put it on github. https://github.com/mdejong/SKShaderBWWindow/ – MoDJ Apr 12 '16 at 20:12
1

Sprite Kit does not provide an interface for using custom OpenGL shaders. The SKEffectNode class lets you use Core Image filters to post-process parts of a Sprite Kit scene, though. Core Image provides a number of built-in filters that might do some of what you're after, and on OS X you can create custom filter kernels using a language similar to GLSL.

rickster
  • 124,678
  • 26
  • 272
  • 326