Framework 4 (Last updated: October 25, 2019)Framework 3 (Last updated: February 6, 2017)Framework 2 (Last updated: October 8, 2006)Framework (Last updated: October 8, 2006)Libraries (Last updated: September 16, 2004)Really old framework (Last updated: September 16, 2004)
Shadows in fog
Sunday, November 10, 2002 | Permalink
Executable
Source code
ShadowsInFog.zip (406 KB)
Required:GL_ARB_texture_env_dot3
GL_EXT_texture3D
GL_EXT_texture_edge_clamp
GL_EXT_blend_subtractThis demo shows a way to create shadows in fog. It's pretty much a hack with very little common with reality, nor is it particularily general or complete, but hey, it looks nice.
It creates the effect by rendering the shadow volume with front face culling and storing the radial distance into alpha. It then draws it with back face culling and with reverse subtract blending, which will generate distance through shadow in alpha. Then with some fancy blending I mix it together to get it into some kind of shadow.
Should run on Radeon8500/Parhelia/GF3 and up.