Site hosted by Angelfire.com: Build your free website today!

Ripple Emulator: Investigating Pixel Shaders

As computing power steadily increases, it becomes more practical to dedicate more computing time to alter images at their lowest level: pixel by pixel. Pixel by pixel effects (known as pixel shaders) are a set of basic rules that a computer uses to change each pixel of a given image one at a time. The advantages of pixel shaders are numerous: increased flexibility and control over effects, the ability to create constantly changing and modulating effects, and thereby produce much more realistic environments. The downside to pixel shaders is that they require a large amount of processing power to run smoothly, and this is why many programs and video rendering programs are only beginning to offer pixel shader support. Software companies such as Microsoft have included pixel shader support in their latest release of their computer graphics api, DirectX.

To better understand pixel shaders and how they work, I programmed an application in Visual Basic to open a bitmap image and alter it in realtime using pixel shader techniques. The program uses pixel operations to simulate random ripples on the surface of the picture.

This is the source image, that the program will alter to simulate ripples

This is a snapshot of the picture as the program is in the act of simulating ripples.

The program allows the number of active ripples and the quality of those ripples to be altered, so different variations of pixel shader techniques can be tried.

Click here to download the program. [98KB]