Lecture 1: The Graphics Pipeline

Overview

Motivation: Draw shapes/geometry to 2D screen.

The Graphics Pipeline is the process by which we convert a description of a 3D scene into a 2D image that can be viewed.

This involves both transformations between spaces and conversions from one type of data to another.

coordinate frame

pixel coordinates

We need a way to transform from world to pixel.

General Graphics Pipeline

graphics pipeline

vertex array: what are the vertices

vertex shader: move to camera’s perspective

object space --> screen coordinates

rasterization: which pixels are inside triangle?

fragment shader: what color is each pixel?

testing and blending: which pixels are visible?

Software Rasterizer

  1. Read in triangles
  2. Convert triangls to windows coordinates
  3. Rasterize each triangle
    • (use barycentric coordinates to test in-triangle AND interpolat colors)
  4. Write interpolated color values per pixel (using a z-buffer test to resolve depth)

Labs

Lab 1

Lab 2