twice two . com

Light Rays

This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

(Click to place the light source.)

This applet illustrates the oft-overused "light rays" effect, a sort of cheap volumetric lighting simulation. This implementation is pretty slow, as it essentially calculates the amount of light at each pixel by integrating along a line from the pixel to the light source. Often this effect is faked simply by overlaying scaled copies of the source image on itself.