"This isn't right, this isn't even wrong."
- Wolfgang Pauli

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)
Refraction
Wednesday, February 13, 2002 | Permalink

Executable
Source code
refraction.zip (395 KB)

Required:
GL_ARB_multitexture
GL_ATI_fragment_shader
WGL_ARB_render_texture
GL_EXT_texture_edge_clamp
GL_SGIS_generate_mipmap
This is a demo showing how to create a hot air effect with dependent texture reads. First the world is rendered to a texture, then to the screen. Then it creates a fire with a procedural texture. This fire texture is then used both as colors and as an offset of the texture coords for the texture I rendered to. The final result is an effect where it looks like the hot air around the fire refracts the light from the background.

Easy? Oh yes!