All you need to do is clamp your time value, so that it holds a constant value after it's gone through the desired number of iterations. // Constants to declare elsewhere. #define TWOPI 6.28318530718 #define maxCycles 1.0f // These lines go inside your mainImage shader. float phase = (iTime - startTime)/TWOPI; phase = min(phase, maxCycles); float factor = .5 * sin(TWOPI * phase); This effectively stops time after the desired number of cycles of the sine function. Note that you'll need to provide a startTime so it knows when the pinch began. You can use a float uniform for this and set it once at the beginning of the effect.