An effect like that is most likely done as a second pass, after storing a copy of the color buffer.
When looking carefully, you can see some of the vertices from the shape of the effect above the character. So this scene in particular probably does something like this:
- First render the scene into a color buffer, without the distortion effect.
- Because it's not possible to both read from and write to a same frame buffer at the same time, copy it as is (blit) into another frame buffer. From now on, new draws will go into that new frame buffer.
- In the new frame buffer, draw a mesh with the shape of the effect, using a shader that will fetch the texture of the first color buffer, with an offset depending on the normal. Also note that:
- The mesh is opaque (no blending): it's the texture that makes it look transparent.
- Although we don't see this in the screenshot, it's also perfectly possible to use the depth buffer as usual and have the effect intersect with the scene.
Finally a simpler effect, like rain drops on the screen, could be done this way:
- First render the scene into a frame buffer, without the distortion effect.
- Copy the entire frame buffer into another frame buffer using a custom shader. The shader will apply some offset to the texture coordinates (either directly or maybe using a distortion texture), thus distorting the image.