���Chapter X
Output Merger
All class materials including this PowerPoint file are available at
https://github.com/medialab-ku/openGLESbook
Introduction to Computer Graphics with OpenGL ES (J. Han)
Color and Depth Buffers
10-2
h
w
h
w
Introduction to Computer Graphics with OpenGL ES (J. Han)
RGBZ Fragments
10-3
v_normal
v_texCoord
v_view
z
{v_normal, v_texCoord, v_view}
z
fragColor
rasterization
Introduction to Computer Graphics with OpenGL ES (J. Han)
Z-buffering
10-4
z = 0.5
z = 0.8
viewport
Introduction to Computer Graphics with OpenGL ES (J. Han)
Z-buffering (cont’d)
10-5
Two triangles are parallel to the xy-plane.
Introduction to Computer Graphics with OpenGL ES (J. Han)
Z-buffering (cont’d)
10-6
Introduction to Computer Graphics with OpenGL ES (J. Han)
Z-buffering in GL
10-7
Introduction to Computer Graphics with OpenGL ES (J. Han)
Alpha Blending
10-8
α=1
α=0.5
α=0.15
Introduction to Computer Graphics with OpenGL ES (J. Han)
Alpha Blending (cont’d)
10-9
α=0.5 α=0.5 α=1.0 α=0.5 α=1.0
(x,y)
Introduction to Computer Graphics with OpenGL ES (J. Han)
Alpha Blending in GL
10-10
Introduction to Computer Graphics with OpenGL ES (J. Han)
Alpha Blending in Games�
10-11
Introduction to Computer Graphics with OpenGL ES (J. Han)
Alpha Blending for Fog
10-12
equally
distributed
fog
fog accumulated
with the distance
from the eye
Silent Hills
Introduction to Computer Graphics with OpenGL ES (J. Han)
Alpha Blending for Fog (cont’d)
10-13
f = 0
f = 1
co
f = 0.2
f = 0.8
f
c = fcf + (1 − f)co
cf
N
F
d
d
Introduction to Computer Graphics with OpenGL ES (J. Han)