I am interested in creating a screen transition seen in a lot of retro games. The transition is just a kind of pixelated distortion that increases or decreases in granularity over time.
The effect is present in Super Mario World, and can be seen recreated in this clip.
Also, here is an image depicting the transition (ignore the gradual lightening of the screen):
I want to achieve this by animating the uniforms of a GLSL shader.
Unfortunately, I don't know how to design the shader.
I know how to sample gradient textures to create various screen wipes, as well as how to sample noise textures to create simple distortion effects. But I can't figure out exactly how to create this effect.
Any advice on how to set up a shader to achieve this effect?