Skip to content

zakkhoyt/SpriteKit_Custom_Shaders

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published