Evolution of GPUs
Chris Seitz
PDF created with pdfFactory Pro trial version www.pdffactory.com
Overview
Concepts:
Real-time rendering
Hardware graphics pipeline
Evolution of the PC hardware graphics pipeline:
1995-1998: Texture mapping and z-buffer
1998: Multitexturing
1999-2000: Transform and lighting
2001: Programmable vertex shader
2002-2003: Programmable pixel shader
2004: Shader model 3.0 and 64-bit color support
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Real-Time Rendering
Graphics hardware enables real-time rendering
Real-time means display rate at more than 10 images per second
3D Scene =
Collection of
3D primitives (triangles, lines, points)
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Image =
Array of pixels
PC Architecture
Motherboard
CPU
System Memory
Bus Port (PCI, AGP, PCIe)
Graphics Board
Video Memory
GPU
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Hardware Graphics Pipeline
Application
Stage
3D
Triangles
Geometry
Stage
For each
triangle vertex:
Transform
position:
3D -> screen
Compute
attributes
2D
Triangles
Rasterization
Stage
For each
triangle:
Rasterize
triangle
Interpolate
vertex attributes
Shade
pixels
Resolve
visibility
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Pixels
Real-time Graphics 1997:
RIVA 128 – 3M Transistors
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Real-time Graphics 2004:
©2004 NVIDIA Corporation. All rights reserved.
UnReal Engine 3.0 Images Courtesy of Epic Games
PDF created with pdfFactory Pro trial version www.pdffactory.com
‘95-‘98: Texture Mapping & Z-Buffer
CPU
GPU
Application /
Geometry Stage
Rasterization Stage
Rasterizer
2D Triangles
Texture
Unit
Bus
(PCI)
2D Triangles
Textures
Textures
System Memory
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Video Memory
Raster
Operations
Unit
Frame
Buffer
Raster Operations Unit (ROP)
Rasterizer
Texture
Unit
Fragments
Raster
Operations
Unit
Scissor Test
Fragment
tested against scissor rectangle
Screen Position
(x, y)
Alpha Test
Frame Buffer
tested against reference value
Alpha Value
a
Depth
z
Color
(r, g, b)
Stencil Test
stencil buffer value at (x, y)
tested against reference value
tested against z-buffer value at (x, y)
(Visibility test)
blended with color buffer value at (x, y)
Ksrc * Colorsrc + Kdst * Colorsrc
(src = fragment, dst = color buffer)
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Z Test
Stencil Buffer
Z-Buffer
Color Buffer
Alpha Blending
Pixels
Texture Mapping
Base Texture
Triangle Mesh
(with UV coordinates)
+
Sampling
Magnification, Minification
Filtering
Bilinear, Trilinear, Anisotropic
Mipmapping
Perspective Correct Interpolation
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
=
Texture Mapping: Mipmapping & Filtering
or
Bilinear Filtering
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Trilinear Filtering
Filtering Examples
Point
Bilinear
Trilinear
Anisotropic
(4X) & Trilinear
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Incoming
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Riva TNT – 7M Transistors - 1998
Multitexture
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
1998: Multitexturing
CPU
GPU
Application /
Geometry Stage
Rasterization Stage
Rasterizer
Multi
Texture
Unit
Raster
Operations
Unit
2
2D Triangles
Bus
(AGP)
2D Triangles
Textures
Textures
System Memory
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Video Memory
Frame
Buffer
Multitexturing
Base Texture
modulated by
Light Map
X
=
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
from UT2004 (c)
Epic Games Inc.
Used with permission
GeForce 256 – 23M Transistors - 1999
Hardware
Transform &
Lighting
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
1999-2000: Transform and Lighting
CPU
GPU
Application
Stage
Rasterization Stage
Geometry Stage
Transform
& Lighting
Unit
3D
Triangles
“Fixed Function Pipeline”
Rasterizer
Texture
Unit
Bus
(AGP)
3D Triangles
Textures
Textures
System
Memory
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Video Memory
Register
Combiner
Raster
Operations
Unit
Frame
Buffer
Transform and Lighting Unit (TnL)
Transform and Lighting Unit
Lighting
Transform
Model or Object Space
World Matrix
World Space
Model-View Matrix
View Matrix
Material Properties
Light Properties
Vertex Color
Camera or Eye Space
Projection Matrix
Projection or Clip Space
Perspective Division &
Viewport Matrix
Screen or Window Space
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Vertex Diffuse &
Specular Color
Wanda and Bubble
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
GeForce 2
Pixel Shading
Multitexture
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
GeForce 3
Programmable
Vertex Shading
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
2001: Programmable Vertex Shader
CPU
GPU
Application
Stage
Vertex
Shader
(no flow
control)
3D
Triangles
Rasterization Stage
Geometry Stage
Rasterizer
w/ Z-Cull
Texture
Unit
Textures
Textures
System
Memory
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com
Raster
Operations
Unit
(4 Textures)
Bus
(AGP)
3D Triangles
Register
Combiner
Video Memory
Frame
Buffer
Vertex Shader
A programmable processor for any
per-vertex computation
void VertexShader(
// Input per vertex
in float4 positionInModelSpace,
in float2 textureCoordinates,
in float3 normal,
// Input per batch of triangles
uniform float4x4 modelToProjection,
uniform float3 lightDirection,
// Output per vertex
out float4 positionInProjectionSpace,
out float2 textureCoordinatesOutput,
out float3 color
)
{
// Vertex transformation
positionInProjectionSpace = mul(modelToProjection, positionInModelSpace);
// Texture coordinates copy
textureCoordinatesOutput = textureCoordinates;
// Vertex color computation
color = dot(lightDirection, normal);
}
©2004 NVIDIA Corporation. All rights reserved.
PDF created with pdfFactory Pro trial version www.pdffactory.com