We can describe swirl as transformation that rotates pixel around center, in such way that rotation angle is proportional to distance from center. Knowing what shader should do lets dissect it line by line.
vec2 uv = SCREEN_UV; - find out where on the screen currently process pixel is displayed. UV normally is a vec2 containing values from 0 to 1
vec2 rel = uv-vec2(0.5,0.5); - because SCREEN_UV's center is (0.5,0.5), and we need to rotate pixels around it, we change our origin (all next operation will be computed relative to center)
float angle = length(rel)*rotation; - pixel further away from center (have greater length ) should be more transformed that pixel closer to center
mat2 rot = mat2(vec2(cos(angle),-sin(angle)),vec2(sin(angle),cos(angle))); - calculate transform matrix that will rotate pixel by computed angle, why it looks like this you can learn on wikipedia
rel = rot * rel; - lets rotate our pixel by applying our rotation matrix, for matrix vector multiplication look here
uv = clamp(rel + vec2(0.5,0.5),vec2(0,0),vec2(1,1)); - because previous operation were relative to center of screen we need to convert it back to original reference system and make sure it is inside boundary of picture (that whats clamp is here for)
COLOR.rgb= textureLod(SCREEN_TEXTURE,uv,0.0).rgb; - finally we have our rotated pixel position so we know from where in original picture we should copy pixel to our output