- Forward


An Overview of the Rendering Pipeline
In "Modern" OpenGL


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

Introduction
Back SMYC Forward
  • The "Classic" Fixed Pipeline:
    • The programmer specifies shapes, colors/textures, and the environment; the pipeline then does the rendering
  • The "Modern" Flexible Pipeline:
    • The programmer specifies shapes, colors/textures, the environment and the rendering algorithm (using shaders
The Programmer's Responsibilities
Back SMYC Forward
  1. Specification of the Vertices
  2. Implementation of the Vertex Shader
  3. Implementation of the Tesselation Shaders (Optional)
  4. Implementation of the Geometry Shader (Optional)
  5. Implementation of the Fragment Shader
  6. Initiation of the Rendering Process
The Pipeline
Back SMYC Forward
  1. Vertex Processing:
    1. Each vertex is processed by a vertex shader
    2. Each vertex may be processed by a tesselation control shader and tesselation evaluation shader
    3. Each vertex may be processed by a geometry shader
  2. Vertex Post-Processing:
    1. Transform feedback
    2. Clipping and transformation to window space
  3. Assembly of Primitives
  4. Generation of Fragments (i.e., Rasterization)
  5. Fragment Processing
  6. Per-Sample Processing:
    1. Scissor, Stencil and Depth Tests
    2. Blending
    3. Logical Operations and Write Masks
    4. Others
Vertex Specification
Back SMYC Forward
  • Vertex Array Objects:
    • Describe the data associated with each vertex
  • Vertex Buffer Objects:
    • Store the data associated with each vertex
Vertex Rendering
Back SMYC Forward
  • Primitives:
    • As in "classic" OpenGL (e.g., GL_POINTS, GL_LINES, GL_TRIANGLES, etc...
  • Initiation:
    • Using a drawing command (e.g., glDrawArrays()
The Necessary Shaders
Back SMYC Forward
  • Vertex Shader (Mandatory):
    • Converts each incoming vertex to exactly on outgoing vertex
  • Fragment Shader (A "Default" Can Be Used):
    • Converts each incoming fragment (i.e., group of pixels) into a list of colors for each buffer, a depth value, and a stencil value
There's Always More to Learn
Back -