Thursday, July 19, 2012

Classic Plasma Effect (1998)

In 1998 hardware acceleration for rasterization was gaining rapid ground, but many demos were still made using CPU-only approaches.  Though I was late to the party, and sort of alone in my basement, I wanted to try my hand at coding a few effects.

Here is a plasma effect I came up with (though I recall reading about the general principle somewhere, perhaps in a document found on a BBS).  It uses a precomputed height map; two 320x200 windows slide around over this heightmap in a lissajous pattern.  Every frame, the contents of both sliding windows are sampled from the underlying heightmap and summed into the framebuffer.  (You can picture this as two copies of the same heightmap sliding atop one another, with the computer screen displaying a screen-sized region of the result.)  The VGA color palette is setup as a smooth color ramp, and every frame the palette is rotated a bit to change the look of the plasma.


No comments:

Post a Comment