Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Emil Persson, posted on December 25, 2002

Image Description, by Emil Persson

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


Archive Notice: This content is archived, and commenting is no longer active. It is here for reference purposes. This content was added on an older version of flipcode, before the site closed in 2005.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.