Per-sprite motion blur with SpriteKit and GLSL fragment shaders.
Demo
Download SpriteKit Motion Blur from GitHub, build, and run.
Shader
The motion blur effect is made with a SpriteKit GLSL shader applied on the sprite. The sprite size is larger than the white disc, so the fragment shader has transparent padding where it can draw beyond the disc radius.
The shader samples the sprite texture several times along the current movement direction, then averages those samples into one final color.
Motion
The dragging of the shape is physics-based. The sprite is moved with a Proportional-Derivative controller: each frame, the user touch supplies a target position. The controller applies force to move the sprite's body toward the target position.
This physics-based controller provides the springy and interruptible motion of the sprite. The shader reads the direction and magnitude of motion from the physics body's velocity vector.
Credits
This experiment is a pure SpriteKit version of Zoom and Motion Blur Shader by Alex Widua.