As per the documentation, SKScene
is a child of SKEffectNode
and thus should conform and apply the shader property if not nil.
I've successfully added a shader to individual SKSprites (so I know my shader code is working) but if I apply that same shader to the Scene, nothing happens, no error, nothing.
I've tried initializing the shader at multiple places :
Is there anything that I'm missing ?
(I'm using adapted code from https://github.com/twostraws/ShaderKit)
A similar question was asked 6 years ago (Applying a custom SKShader to SKScene that pixelates the whole rendered scene in iOS 8 SpriteKit with Swift) but labels the quirk as a bug (Maybe it was just never corrected in the meantime ?)
You should always remember to set shouldEnableEffects
to true
.