I’m developing a match 3 game. It has some power-ups. I want some effect like a ripple when exploding a bomb. I’m not talking about particle systems. Maybe post-processing or something.
Distortion like this will probably require a post-processing effect to shift pixels on the screen, and without any shader knowledge this will be a challenge to understand. Definitely read up on how shaders work.
I’ll try to describe what’s happening in basic terms:
The shader will use a “grab pass” to access all the pixels on screen.
The fragment function in the shader is what decides what color each pixel will be, it returns an RGBA color value. Each fragment has coordinates and in the case of a sprite, just reads a texture and returns the color at those coordinates to display.
In this case, the shader will be reading the screen pixels, and will offset the coordinates by some amount away from the center of the distortion shape object (by however extreme the distortion is), and use that screen location’s color instead.
It looks like in your video the ring sprite used for this distortion has some kind of a gradient to it, and the gradient affects how much distortion is applied so there isn’t a harsh edge, and can also be faded out over time.