tAAt 2012 new year demo breakdown writeup

For 2012's new year, I wrote this silly little thing..

You can see most of the demo's source code as it's mostly just one shader. As an overview, what's going looks more or less like this:

The "composition" shader takes in (or generates) the above layers and combines them in various ways. Let's look at each of the layers separately.

At the bottom there's the "2012" image, which is gradually revealed. I renreded it in blender, and tweaked it in photoshop. I tried to go for the same kind of metallic look as good old death rally's level overview images (one image here, but for how long, I don't know).

The heaviest bit done on C side is the leafy particle system. Why leaves? Don't know; I'd done snow flakes earlier, so, why not..

The leaves float left and right using sine, and rotate a bit at the same speed. In addition to gravity, the leaves are blown to the left at increasing power to make that curved path. Simple math I spent a bit too much time tweaking on. I've found myself using libreoffice calc (or openoffice, or even excel, depending) more and more when creating such curves, but trial and error still plays a big part.

The leaves are rendered to an FBO which is then fed to the composition shader.

There are three cloud layers for parallax (feeling of depth). Each of the layers is calculated by sliding a couple of perlin noise textures that slide at different speeds. These are summed with a "cloudiness" constant adjusted by the C side the slowly make the clouds disappear.

There's some horizontal blurring going on too, but that's a minor detail.

This layer is generated in the shader, and it's screen resolution dependent; the pixels generated are mapped to the pixels on the screen. The effect attepts to make the separate pixels stand out, or to make the display look worse. Kinda like, "you're watching TV on TV".

Finally, to make the "tv" you're watching look like an old one, there's the darkened corners. This is also generated on the shader, and differs a bit based on your screen size and aspect ratio.

The second part - the credits and greetings - simply scrolls a 256x4096 texture on the screen, agonizingly slowly. This actually takes longer than the first part. It's meant to be a joke, and felt like a good idea at the time.

The music is based on a theme I whistled one evening while taking the dogs for a walk, fleshed out and composed by Nitro, with speech by his nice neighbor in Alicante, Spain.

Comments, questions, etc. appreciated.