More on overlays

Overlay demoThat last screenshot was pretty subtle. Here’s one that’s downright garish.

These are three boxes, rendered using a single overlay. Each box is rendered as ‘white’ in VectorStorm, but they’re all sitting under a single overlay that acts as a gradient from red to green, so the final colors that show on screen are between red and green, depending on locations of the boxes.

As the boxes move and spin, they move beneath the color overlay as you would expect them to; the color is stationary on the screen as though it was a sheet of cellophane laid over it, rather than moving along with the boxes.

Note that in this shot the gradient doesn’t line up precisely between the two larger boxes, since I’m rendering the overlay by calculating the correct colour at each vertex, instead of per-pixel. I’ll eventually write a fragment shader to calculate this effect correctly per pixel, which will probably actually turn out to be even faster. But for now, this will do. :)