Submitted by , posted on 31 August 2002

Image Description, by

I was playing around with double sided alpha testing, i.e. alpha tests of the form min<a<max, and this is the result. Of course most video cards (all?) do not directly support this kind of alpha test. By using the stencil buffer to hold the results of one portion of the test, the complete test can be effectively emulated with 2 passes on not only current hardware, but also older video cards. I have this singular effect demo with source code available at The demo uses both GLUT and DevIL and are not included. I believe I was using version 1.6.5 of DevIL, and I have no idea which version of GLUT I used since the glut32.dll properties doesn't show a version tab, I assume its 3 something.

I should have another IOTD in the near future of a game I am about to complete. :-)

Until then,
David Frey
a.k.a Mastaba on the flipcode boards

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.