Skip to content

Instantly share code, notes, and snippets.

@veeneck
Created May 28, 2015 15:48
Show Gist options
  • Save veeneck/3e0292d872a3146d0620 to your computer and use it in GitHub Desktop.
Save veeneck/3e0292d872a3146d0620 to your computer and use it in GitHub Desktop.
Attach a shader in SpriteKit
let sprite = self.childNodeWithName("targetSprite") as! SKSpriteNode
let shader = SKShader(fileNamed: "shader1.fsh")
sprite.shader = shader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment