Submitted by , posted on 25 December 2002

Image Description, by

This is a screenshot from my latest demo (available with source here: ). It shows some perpixel phong lighting with shadowmapping. It's done through a fragment program in OpenGL, so it requires a Radeon 9700.

The shadowmapping works for pointlights by rendering the radial distance into a cubemap. To conserve memory and keep high precision I multiply it with 256 and store the fraction in the red channel and the floor in the blue channel. This is the extracted in the fragment program. This way I can get 16bit precision even though I only have 8 bits / channel.


Image of the Day Gallery



Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.