SpriteKit_Custom_Shaders
This project was ported from on online tutorial found here. It demonstrates how to use framgent shaders with SpriteKit, including uniforms.
The original project was written in Objective-C using Xcode 8. This project ports the original to Swift 3.0 using Xcode 10. The project is largely the same with a few exceptions:
- The SKScene is loaded programmatically, although the code to load directly from .sks remains, but is commented out
- The scene is created programmatically to the size of its view. UIScreen.scale is used to calculate the size uniforms instead of relying on a zooming effect.
- I've commented out the addition of a SKSpriteNode which had no effect on the final scene (assuming no errors).
Notes:
- I've noticed that the reflection shader fails to render about 50% of the time in iOS simulator. There are no errors in the console and no crashes. I'm not sure why.