The Graphics Pipeline Patrick Cozzi University of Pennsylvania CIS 565 - Fall 2012.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS SOFTWARE.
Advertisements

Understanding the graphics pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
Graphics Pipeline.
Patrick Cozzi University of Pennsylvania CIS Fall 2013
Patrick Cozzi University of Pennsylvania CIS Spring 2012
CS-378: Game Technology Lecture #9: More Mapping Prof. Okan Arikan University of Texas, Austin Thanks to James O’Brien, Steve Chenney, Zoran Popovic, Jessica.
The Programmable Graphics Hardware Pipeline Doug James Asst. Professor CS & Robotics.
Introduction to Geometry Shaders Patrick Cozzi Analytical Graphics, Inc.
A Crash Course on Programmable Graphics Hardware Li-Yi Wei 2005 at Tsinghua University, Beijing.
Introduction to Geometry Shaders Patrick Cozzi Analytical Graphics, Inc.
IN4151 Introduction 3D graphics 1 Introduction to 3D computer graphics part 2 Viewing pipeline Multi-processor implementation GPU architecture GPU algorithms.
Status – Week 277 Victor Moya.
GPU Simulator Victor Moya. Summary Rendering pipeline for 3D graphics. Rendering pipeline for 3D graphics. Graphic Processors. Graphic Processors. GPU.
Evolution of the Programmable Graphics Pipeline Patrick Cozzi University of Pennsylvania CIS Spring 2011.
Status – Week 283 Victor Moya. 3D Graphics Pipeline Akeley & Hanrahan course. Akeley & Hanrahan course. Fixed vs Programmable. Fixed vs Programmable.
The programmable pipeline Lecture 10 Slide Courtesy to Dr. Suresh Venkatasubramanian.
Vertex & Pixel Shaders CPS124 – Computer Graphics Ferdinand Schober.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
Evolution of the Programmable Graphics Pipeline Lecture 2 Original Slides by: Suresh Venkatasubramanian Updates by Joseph Kider.
GPU Tutorial 이윤진 Computer Game 2007 가을 2007 년 11 월 다섯째 주, 12 월 첫째 주.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Computer Graphics: Programming, Problem Solving, and Visual Communication Steve Cunningham California State University Stanislaus and Grinnell College.
Under the Hood: 3D Pipeline. Motherboard & Chipset PCI Express x16.
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume.
GPU Programming Robert Hero Quick Overview (The Old Way) Graphics cards process Triangles Graphics cards process Triangles Quads.
Programmable Pipelines. Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Geometric Objects and Transformations. Coordinate systems rial.html.
Programmable Pipelines. 2 Objectives Introduce programmable pipelines ­Vertex shaders ­Fragment shaders Introduce shading languages ­Needed to describe.
Chris Kerkhoff Matthew Sullivan 10/16/2009.  Shaders are simple programs that describe the traits of either a vertex or a pixel.  Shaders replace a.
09/09/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Event management Lag Group assignment has happened, like it or not.
The Graphics Rendering Pipeline 3D SCENE Collection of 3D primitives IMAGE Array of pixels Primitives: Basic geometric structures (points, lines, triangles,
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
The programmable pipeline Lecture 3.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Stream Processing Main References: “Comparing Reyes and OpenGL on a Stream Architecture”, 2002 “Polygon Rendering on a Stream Architecture”, 2000 Department.
Computer Graphics The Rendering Pipeline - Review CO2409 Computer Graphics Week 15.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
GRAPHICS PIPELINE & SHADERS SET09115 Intro to Graphics Programming.
CS662 Computer Graphics Game Technologies Jim X. Chen, Ph.D. Computer Science Department George Mason University.
Programmable Pipelines Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts Director, Arts Technology Center University.
Review of OpenGL Basics
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
© David Kirk/NVIDIA and Wen-mei W. Hwu, ECE408, University of Illinois, Urbana-Champaign 1 Programming Massively Parallel Processors Lecture.
From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
09/25/03CS679 - Fall Copyright Univ. of Wisconsin Last Time Shadows Stage 2 outline.
What are shaders? In the field of computer graphics, a shader is a computer program that runs on the graphics processing unit(GPU) and is used to do shading.
GLSL Review Monday, Nov OpenGL pipeline Command Stream Vertex Processing Geometry processing Rasterization Fragment processing Fragment Ops/Blending.
Graphics Pipeline Bringing it all together. Implementation The goal of computer graphics is to take the data out of computer memory and put it up on the.
GPU Architecture and Its Application
Programmable Pipelines
A Crash Course on Programmable Graphics Hardware
Graphics on GPU © David Kirk/NVIDIA and Wen-mei W. Hwu,
Graphics Processing Unit
Lecture 18 Fasih ur Rehman
Chapter 6 GPU, Shaders, and Shading Languages
The Graphics Rendering Pipeline
CS451Real-time Rendering Pipeline
Models and Architectures
Models and Architectures
Introduction to Computer Graphics with WebGL
Graphics Processing Unit
Models and Architectures
Models and Architectures
Computer Graphics Introduction to Shaders
CIS 441/541: Introduction to Computer Graphics Lecture 15: shaders
OpenGL-Rendering Pipeline
CIS 6930: Chip Multiprocessor: GPU Architecture and Programming
Presentation transcript:

The Graphics Pipeline Patrick Cozzi University of Pennsylvania CIS Fall 2012

Announcements 10/29 – Eric Lengyel Game Engine Architecture Guest Lecture 10/30 – Class in SIG lab  Instead of class on 10/31 Build vs. buy 2

Course Contents Mobile Real-Time Rendering OpenGL / WebGL Graphics Pipeline Parallel Algorithms CUDA GPU Architecture 3

Agenda Brief Graphics Review Graphics Pipeline Mapping the Graphics Pipeline to Hardware 4

Graphics Review Graphics RenderingModelingAnimation Real-Time Rendering … … … 5

Graphics Review: Modeling Modeling  Polygons vs. triangles How do we store a triangle mesh?  Implicit Surfaces  … 6

Triangles 7

8

Implicit Surfaces Images from 9

Graphics Review: Rendering Image from 10

Graphics Review: Rendering Rendering  Goal: Assign color to pixels Two Parts  Visible surfaces What is in front of what for a given view  Shading Simulate the interaction of material and light to produce a pixel color 11

Graphics Review: Animation Move the camera and/or agents, and re- render the scene  In less than 16.6 ms (60 fps) 12

Graphics Pipeline Walkthrough Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Images from 13

Vertex Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Pull together a vertex from one or more buffers Also called primitive processing (GL ES) or input assembler (D3D) Image from Framebuffer 14

Vertex Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly positions texture coordinates OpenGL provides lots of flexibility for pulling vertex attributes from different buffers For example (no indices): normal, binormal, bitagent... Vertex 0 Framebuffer 15

Vertex Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly positions texture coordinates OpenGL provides lots of flexibility for pulling vertex attributes from different buffers For example (no indices): normal, binormal, bitagent... Vertex 0 Framebuffer 16

Vertex Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly positions texture coordinates OpenGL provides lots of flexibility for pulling vertex attributes from different buffers For example (no indices): normal, binormal, bitagent... Vertex 1 Framebuffer 17

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer P clip = (M model-view-projection )(P model ) Transform incoming vertex position from model to clip coordinates Perform additional per-vertex computations; modify, add, or remove attributes passed down the pipeline Formerly called the Transform and Lighting (T&L) stage. Why? Vertex Shader P model P clip Vertex Shader vertex modified vertex 18

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Vertex Shader vertex modified vertex uniforms, e.g., matrices, etc. P world = (M model )(P model ) P eye = (M view ) (P world ) P clip = (M projection ) (P eye ) Model to clip coordinates requires three transforms: model to world world to eye eye to clip Use 4x4 matrices passed to the vertex shader as uniforms 19

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer P world = (M model )(P model ) Model to world: Image from 20

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer P eye = (M view ) (P world ) World to eye: Image from 21

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer P clip = (M projection ) (P eye ) Eye to clip coordinates: Image from 22

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer P clip = (M model-view-projection )(P model ) P clip = (M projection )(M view )(M model )(P model ) In practice, the model, view, and projection matrices are commonly burnt into one matrix? Why? 23

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Model to clip coordinate transformation is just one use for the vertex shader. Another use: animation. How would you implement pulsing? Image from 24

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer How would you implement pulsing? Displace position along surface normal over time How do we compute the displacement? Image from 25

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer How do we compute the displacement? Consider: What are the shortcomings? Image from float displacement = 0.5 * (sin(u_time) + 1.0); 26

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer How do we compute the displacement? Consider: What are the other shortcomings? Image from float displacement = u_scaleFactor * 0.5 * (sin(u_frequency * u_time) + 1.0); 27

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer How do we get the varying bulge? Image from 28

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer How do we get the varying bulge? Consider Image from float displacement = u_scaleFactor * 0.5 * (sin(position.y * u_frequency * u_time) + 1.0); 29

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer What varies per-vertex and what does not? float displacement = u_scaleFactor * 0.5 * (sin(position.y * u_frequency * u_time) + 1.0); 30

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Vertex Shader vertex modified vertex uniforms On all modern GPUs, vertex shaders can read from textures as well as uniform variables. What is this useful for? textures 31

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Example: Textures can provide height maps for displacement mapping Images from 32

Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Technology preview: vertex shaders are becoming available to CSS on the web as CSS shaders Demo More info on CSS shaders: 33

Particle System Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer RenderMonkey Demos RenderMonkey: Morph Bounce 34

Primitive Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A vertex shader processes one vertex. Primitive assembly groups vertices forming one primitive, e.g., a triangle, line, etc. VS 35

Primitive Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A vertex shader processes one vertex. Primitive assembly groups vertices forming one primitive, e.g., a triangle, line, etc. VS 36

Primitive Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A vertex shader processes one vertex. Primitive assembly groups vertices forming one primitive, e.g., a triangle, line, etc. VS 37

Primitive Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A vertex shader processes one vertex. Primitive assembly groups vertices forming one primitive, e.g., a triangle, line, etc. VS 38

Primitive Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A vertex shader processes one vertex. Primitive assembly groups vertices forming one primitive, e.g., a triangle, line, etc. VS Primitive Assembly 39

Primitive Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A vertex shader processes one vertex. Primitive assembly groups vertices forming one primitive, e.g., a triangle, line, etc. VS 40

Primitive Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A vertex shader processes one vertex. Primitive assembly groups vertices forming one primitive, e.g., a triangle, line, etc. VS 41

Primitive Assembly Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A vertex shader processes one vertex. Primitive assembly groups vertices forming one primitive, e.g., a triangle, line, etc. VS Primitive Assembly 42

Perspective Division and Viewport Transform Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer There are a series of stages between primitive assembly and rasterization. Perspective division Viewport transform P ndc = (P clip ).xyz / (P clip ).w Image from P window = (M viewport-transform )(P ndc ) 43

Clipping Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer There are a series of stages between primitive assembly and rasterization. Clipping Image from 44

Rasterization Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Determine what pixels a primitive overlaps How would you implement this? What about aliasing? What happens to non-position vertex attributes during rasterization? What is the triangle-to-fragment ratio? 45

Fragment Shader Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Shades the fragment by simulating the interaction of light and material Loosely, the combination of a fragment shader and its uniform inputs is a material Also called a Pixel Shader (D3D) What exactly is the fragment input? What are examples of useful uniforms? Useful textures? Fragment Shader fragment fragment’s color uniforms textures 46

Fragment Shader Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Example: Blinn-Phong Lighting Image from float diffuse = max(dot(N, L), 0.0); Fragment Shader Rasterizer 47

Fragment Shader Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Example: Blinn-Phong Lighting Why not evaluate per-vertex and interpolate during rasterization? Image from float specular = max(pow(dot(H, N), u_shininess), 0.0); Fragment Shader Rasterizer 48

Fragment Shader Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Per-fragment vs. per-vertex lighting Which is which? Image from Fragment Shader Rasterizer 49

Fragment Shader Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Effects of tessellation on per-vertex lighting Image from Fragment Shader Rasterizer 50

Fragment Shader Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Another example: Texture Mapping Image from Fragment Shader Rasterizer 51

Fragment Shader Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Lighting and texture mapping Fragment Shader Rasterizer Image from 52

Fragment Shader Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Another example: Bump mapping Fragment Shader Rasterizer 53

Fragment Shader Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Another example: Bump mapping Fragment Shader Rasterizer 54

Fragment Shader Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Fragment shaders can be computationally intense Fragment Shader Rasterizer Image from 55

Fragment Shader Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A fragment shader can output color, but what else would be useful? 56

Fragment Shader Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A fragment shader can output color, but what else would be useful? Discard the fragment. Why? Depth. Why? Multiple colors. Why? 57

Fragment Shader RenderMonkey Demos RenderMonkey: NPR Glass Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer 58

Per-Fragment Tests Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer A fragment must go through a series of tests to make to the framebuffer What tests are useful? 59

Scissor Test Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Scissor Test Stencil Test Depth Test Discard a fragment if it is within a rectangle defined in window coordinates Why is this useful? Does this need to happen after fragment shading? 60

Scissor Test Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Scissor Test Stencil Test Depth Test The scissor test is useful for “scissoring out” parts of the window that do not need to be shaded For performance. Why? Post-processing effects Multipass rendering 61

Stencil Test Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Scissor Test Stencil Test Depth Test The stencil test can discard arbitrary areas of the window, and count per-fragment A stencil is written to the stencil buffer, and later fragments can be tested against this buffer What is this useful for? 62

Depth Test Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Finds visible surfaces Once called “ridiculously expensive” Also called the z-test Does it need to be after fragment shading? Scissor Test Stencil Test Depth Test 63

Depth Test Image from 64

Depth Test Image from 65

Blending Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Combine fragment color with framebuffer color Can weight each color Can use different operations: +, -, etc. Why is this useful? Fragment Shader Rasterizer 66

Blending Vertex Shader Primitive Assembly Per-Fragment Tests Blend Vertex Assembly Framebuffer Example: Translucency Additive Blending Alpha Blending Fragment Shader Rasterizer C dest = (C source.rgb)(C source.a) + (C dest.rgb) (1 - C source.a); C dest = (C source.rgb)(C source.a) + (C dest.rgb); Image from 67

Graphics Pipeline Walkthrough Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Images from After all that, write to the framebuffer! 68

Evolution of the Programmable Graphics Pipeline Pre GPU Fixed function GPU Programmable GPU Unified Shader Processors 69

Early 90s – Pre GPU Slide from 70

Why GPUs? Exploit Parallelism  Pipeline parallel  Data-parallel  CPU and GPU executing in parallel Hardware: texture filtering, rasterization, MAD, sqrt, etc. 71

3dfx Voodoo (1996) Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Still Software Hardware Image from In hardware: Fixed-function rasterization, texture mapping, depth testing, etc MB memory PCI bus $299 72

Aside: Mario Kart 64 Image from High fragment load / low vertex load 73

Aside: Mario Kart Wii High fragment load / low vertex load? Image from 74

NVIDIA GeForce 256 (1999) Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Hardware Image from In hardware: Fixed-function vertex shading (T&L) Multi-texturing: bump maps, light maps, etc. 10 million polygons per second Direct3D 7 AGP bus 75

NVIDIA GeForce 3 (2001) Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Hardware Optionally bypass fixed-function T&L with a programmable vertex shader Optionally bypass fixed-function fragment shading with a programmable fragment shader Many programming limits Direct3D 8 Pentium IV – 20 stages GeForce 3 – stages Fixed-function stage Programmable stage 76

NVIDIA GeForce 6 (2004) Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Hardware Much better programmable fragment shaders Vertex shader can read textures Dynamic branches Multiple render targets PCIe bus OpenGL 2 / Direct3D 9 textures 77

NVIDIA GeForce 6 (2004) Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Vertex shader can read textures Dynamic branches Multiple render targets PCIe bus OpenGL 2 / Direct3D 9 Image from ftp://download.nvidia.com/developer/presentations/2004/GPU_Jackpot/Shader_Model_3.pdfftp://download.nvidia.com/developer/presentations/2004/GPU_Jackpot/Shader_Model_3.pdf 78

NVIDIA GeForce 6 (2004) Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Vertex shader can read textures Dynamic branches Multiple render targets PCIe bus OpenGL 2 / Direct3D 9 Image from ftp://download.nvidia.com/developer/presentations/2004/GPU_Jackpot/Shader_Model_3.pdfftp://download.nvidia.com/developer/presentations/2004/GPU_Jackpot/Shader_Model_3.pdf 79

Dynamic Branches Image from 80

Dynamic Branches For best performance, fragment shader dynamic branches should be coherent in screen-space How does this relate to warp partitioning in CUDA? 81

NVIDIA GeForce 6 (2004) Image from 6 vertex shader processors 16 fragment shader processors 82

NVIDIA GeForce 8 (2006) Vertex Shader Primitive Assembly Fragment Shader Rasterizer Per-Fragment Tests Blend Vertex Assembly Framebuffer Ground-up GPU redesign Geometry Shaders Transform-feedback OpenGL 3 / Direct3D 10 Unified shader processors Support for GPU Compute Geometry Shader 83

Geometry Shaders Image from David Blythe : 84

NVIDIA G80 Architecture Slide from 85

Why Unify Shader Processors? Slide from 86

Why Unify Shader Processors? Slide from 87

Terminology Shader Model Direct3DOpenGLVideo card Example 392.x NVIDIA GeForce 6800 ATI Radeon X x3.x NVIDIA GeForce 8800 ATI Radeon HD x4.x NVIDIA GeForce GTX 480 ATI Radeon HD

Shader Capabilities Table courtesy of A K Peters, Ltd. 89

Shader Capabilities Table courtesy of A K Peters, Ltd. 90

Evolution of the Programmable Graphics Pipeline Slide from Mike Houston: 91

Evolution of the Programmable Graphics Pipeline Slide from Mike Houston: 92