I need to implement a custom shader node using SpriteKit. In simulator everything is ok. On a device (iPad 3rd gen) shader animation is smooth just for first ~30 seconds, after
Gelan Almagro's answer above works perfectly. I'm adding the Objective-C code for the update: method.
update:
SKSpriteNode *shadedNode = (SKSpriteNode*)[self childNodeWithName:@"shadedNode"]; SKUniform *uniform = [shadedNode.shader uniformNamed:@"myUniform"]; uniform.floatValue = (float)currentTime;