Graphics Pipeline Stages
Lecture 3
Graphic Pipeline Stages:
Sequence of steps, operations that is used to
generate an image using object order
processing.
Graphic pipeline refers to a series of
interconnected stages through which data
and commands describing a scene go
through when being rendered. / produced
2 Instructor: Sadia Arshid
Graphics Pipeline(Contd…)
Application
Command
CPU
GPU
Geometry
Rasterization
Fragment
Display
3 Instructor: Sabina Irum
-
Environment mapping
shadows
4 Instructor: Sabina Irum
Graphics Pipeline Stages
5 Instructor: Sabina Irum
Vertex processing
Input: vertex data (position,
color, etc.)
Output: transformed
vertices in respective object
and colors, etc.
6 Instructor: Sabina Irum
Vertex processing
Other geometry tasks
deformation: skinning, mesh blending
low-quality lighting
pass other properties to next stages of pipeline
the only place to algorithmically alter shape
Programmable hardware unit
algorithm can be changed at run-time by application
only recent change
7 Instructor: Sabina Irum
Clipping and rasterization
Clipping and rasterization
turns sets of vertices into
primitives and fills them in
output: set of fragments
with interpolated data
8 Instructor: Sabina Irum
Clipping
Remove (partial) objects not in the view frustum
efficiency: cull later stages of the pipeline
often referred as culling when full objects removed
9 Instructor: Sabina Irum
Rasterization
approximate primitives into pixels
pixel centered at integer coordinates
determine which pixels to turn on
no antialiasing (jaggies) pixel in the primitive
consider antialiasing for some primitives
input: vertex position in homogenous coordinates
interpolate values across primitive
colors, position at vertices
input: any vertex property
10 Instructor: Sabina Irum
Rasterization
required properties
uniform thickness and brightness
continuous appearance (no holes)
Efficiency
simplicity (for hardware implementation)
11 Instructor: Sabina Irum
Fragment processing
Fragment processing
output: final color and depth
traditionally mostly for
texture lookups
Lighting was computed for
each vertex
today, computes lighting per-
pixel
12 Instructor: Sabina Irum
Fragment processing
Compute final fragment colors, alphas and depth
depth is often untouched if no special effects
final lighting computations
lots of texture mapping
Texture Mapping
13 Instructor: Sabina Irum
Frame buffer processing
Frame buffer processing
output: final picture
hidden surface elimination
14 Instructor: Sabina Irum
Frame buffer processing
Hidden surface removal
sort objects back to front
draw in sorted order
does not work in many cases
15 Instructor: Sabina Irum
Hidden surface removal
16 Instructor: Sadia Arshid
Rendering
Rendering is the process of
generating an image from a model, by means of
computer programs.
The model is a description of three-dimensional
objects in a strictly defined language or data structure
Model would contain geometry, viewpoint, texture,
lighting, and shading information.
The image is a digital image or raster graphics image.
17 Instructor: Sabina Irum
Features of Rendered Image
shading — how the color and brightness of a
surface varies with lighting
texture-mapping — a method of applying detail to
surfaces
fogging/participating medium — how light dims
when passing through non-clear atmosphere or air
shadows — the effect of obstructing light
soft shadows — varying darkness caused by
partially hidden light sources
18 Instructor: Sabina Irum
Features of Rendered Image
reflection — mirror-like or highly glossy
reflection
Transparency or opacity — sharp transmission of
light through solid objects
refraction — bending of light related with
transparency
indirect illumination — surfaces illuminated by
light reflected off other surfaces, rather than
directly from a light source (also known as global
19
illumination)
Instructor: Sabina Irum
Features of Rendered Image
motion blur — objects appear blurry due to
high-speed motion, or the motion of the camera
non-photorealistic rendering — rendering of
scenes in an artistic style, planned to look like a
painting or drawing
20 Instructor: Sabina Irum
Vertex data
21 Instructor: Sabina Irum
Vector processing
22
Rasterization
23 Instructor: Sabina Irum
Fragment processing & Frame Buffer
Fragment Processing Frame Buffer (output image
in the form of pixels)
24
Pipeline Stages
25 Instructor: Sabina Irum