it kinda looks like lossy compression/dithering shaders with some kind of crt shader ontop
actually, the background looks handpainted, the smoke is a perlin noise with darker points being transparent and a crt shader is thrown ontop
You can just dig the devlogedit:
Thanks man - I think it's more exciting in motion because you get all the dither patterns overlapping with different colours, the moving fog and the noise and so on.
The way it's done is quite convoluted - it's probably a 8 pass process or something...
- First comes the fog. It's a simple Pixel Bender shader (so it runs on its own thread) which scrolls three copies of the same semi-transparent texture at different speeds It always goes R-L, but nobody's noticed that so I'm fine with it!
- First lighting process is to prepare the virtual lights (the Pixel Bender shader I wrote supports three, one of which is used for the flashlight.) The scene supports infinite virtual lights, but it wall only render the three nearest the camera, so this bit of code just assigns the properties of the two nearest virtual lights to their two spare shader brethren. This means setting up their colours and attenuation as well as the bitmap mask that's used to draw them, and nice things like glows, flickers and fades.
- The light shader does its thing and is applied to the main buffer.
- Next is the warp shader, which is in use in the top screen, but probably not doing that much. It's used to convey general fucked-up-ness. This has four main parameters - the scratch texture in use (and its position) for old-movie type effects, a desaturation parameter, a blur parameter and TV+magnet-like sin-wave displacement thing. A lot of the work is done code-side to get an interesting spread of parameters, and not have everything fuck up at once.
- That's then applied on top of the fog/light pass.
- In hi-fi mode (there's two modes, these shots are hi-fi,) two grain textures are applied, but updated at a slower framerate than the game (around 24fps which gives a nice filmy feel without sacrificing the smoothness of the game which is meant to go at 60fps.) One grain texture runs at the same resolution as the background image, one runs in native resolution. In this way you get both the individual 4x pixels flickering, as well as the more realistic per-pixel film grain.
- The very last process is to apply the vignette / special texture. This texture took about two days to get right! It has a very subtle set of four overlays which are more pronounced towards the edge... First is a simulation of an RGB CRT, so each 4x pixel is split into a reg, green, blue and 'gap' pixel. Then there's the scanlines, which are very subtle indeed in this one (don't want to hammer them in every game I make.) The next step is a vignette, just a general darkening towards the edges, and finally my favourite, which is the weird 'outlined pixel' thing, which you can spot towards the edge- the pixels become more like individual spot of light, like a faulty CRT or something. Didn't want it all over the image, as it's too strong and distracts from flat areas of colour such as the player's shirt, but I ike the way it breaks up towards the edge.