Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

The effects are done in a very similar vein to the Post Processing Example. I originally intended to use the Post Processing Pass Example but it turns out that that example requires bevy features not yet present in 10.1 (talk about cutting edge graphics :] ), so we had to stick with the more trusty old code.
The general idea is that your camera renders into a texture instead of the main window, and then you have a large quad spanning the whole window that uses said texture, and uses a custom shader material (and it gets rendered to the screen using a different camera).

The shader works by taking the UV coordinates (think like window coordinates, but normalized to be a float in the range 0-1), and the current game time and calculating some sine waves in almost orthogonal directions giving an offset vector. I then add the offset vector to the uv coordinate. This causes the game to use a different pixel (x, y) to render a pixel at coordinates (x_0, y_0), creating the geometric distortions. This makes the screen wavey, however this effect feels very artificial as you can clearly see the waves. To mitigate this, I use this effect with slightly different parameters 4 times moving the pixel coordinates 4 times, which creates an interesting and slightly chaotic pattern.
Maybe the simplest part is the visual colour distortion, which is done by converting the RGB value to HSV and then shifting the hue by how far the pixel being rendered is from the original position and then I just convert HSV back to RGB.
Last major part of the shader are the ripple effects, these are done by calculating a circle (*cough* atually looks like an elipse, though in UV coordinates it follows the equation for a circle). I take the coordinates of my pixel (u,v) and calculate the distance from the center of the ripple, and subtract the desired radius (which is animated with time), this gives me a (signed) distance from the circle (points inside are negative, outside positive, and exactly on the circle is the distance 0), and then I put that value in a gaussian distribution to determine how much to distort that pixel. Basically pixels near 0 distance from the circle get maximum distortion, pixels far away get basically none. Based on this value I then add another offset to the UV vector. There's also some code for contrast-correcting the image, but honestly it's not very good at all, though it does have interesting interactions with the rest of the effects.
Finally there's a bunch of ECS systems that control all the parameters of this shader based on in-game events.

Kind of a gigantic reply, oops, but I hope it's informative.