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


Submitted by Erik Hanspers, posted on August 28, 2003




Image Description, by Erik Hanspers



This is a small stencil shadow demo I wrote when reading the nVIDIA paper "Practical and Robust Shadow Volumes".

The demo features two animating lightsources over a plane with a triangle floating above it, properly casting shadows using the zfail stencil shadow volumes approach.

The code weighs in at 800 lines, and still includes some unused parts. I implemented this in july 2002, and it took perhaps a day to get done. The nVIDIA paper includes a lot of source, so this was no great undertaking, but I guess it may still be interesting for other coders who have not done this to look at.

You will need GLUT to compile the code. I have successfully compiled and run the code on Windows, Linux, OpenBSD and Solaris.

The program may be modified and copied without permission.

Download: iotd-08-28-2003_stencilshadow.tar.gz (5k)


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
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.