PDA

View Full Version : Dithering



iNsaNEiVaN
11-06-2001, 05:10 PM
How do you dither? It's like what they use a lot for smoke/steam effects.

Thanks!

dorbie
11-06-2001, 06:57 PM
I assume you're talking about a stipple type of effect dithered from some underlying transparency. OpenGL doesn't easily support this, you can do a fixed stipple pattern of constant transparency, but OpenGL supplies something much more powerful; alpha blending. You glEnable(GL_BLEND) and use per vertex alpha of alpha information in the texture and glBlendFunc to smoothly mix in your smoke or other effect. The only caveat is that it must be drawn after solid objects even with depth buffering.

OpenGL supports color dithering to get better quality from displays with limited memory, you can turn this on or off. This is a different type of dithering, nothing to do with what OpenGL calls a stipple effect.

iNsaNEiVaN
11-07-2001, 01:34 PM
I wasn't sure if blending was an advanced dithering technique. Thanks