All examples · Post-processing

Motion blur

What this example shows

motionBlur() smears the whole picture along one direction, as if it moved while the shutter was open. velocity is the length and direction of the smear in game pixels, as [x, y], and samples how many reads make it up (at most 32).

A game usually sets velocity from how fast the camera moved this frame, so the blur comes and goes with the speed. Here it is set by hand.

← → to turn it, ↑ ↓ for its length and Space to switch it off.

Starting