03/13/2003
15-462 Graphics I
45
Depth Cueing and Fog
•Another application of blending
•Use distance-dependent (z) blending
–Linear dependence: depth cueing effect
–Exponential dependence: fog effect
–This is not a physically-based model
–
–
–
–
•[Example: Fog Tutor]
GLfloat fcolor[4] = {...};
glEnable(GL_FOG);
glFogf(GL_FOG_MODE; GL_EXP);
glFogf(GL_FOG_DENSITY, 0.5);
glFogfv(GL_FOG_COLOR, fcolor);