Download presentation
Presentation is loading. Please wait.
Published bySherman Hardy Modified over 9 years ago
1
UW EXTENSION CERTIFICATE PROGRAM IN GAME DEVELOPMENT 2 ND QUARTER: ADVANCED GRAPHICS The GPU
2
Goals 1. Understand how the GPU works (high-level) 2. Review the basic rendering pipeline
3
GPU as a state machine GPU records state and renders based on that state Examples of state: Resources: textures and geometry Transformations Alpha blending function Render targets State management can be complex Multiple components must cooperate with each other Redundant/inappropriate state changes can hurt perf
4
GPU as a sequential command processor GPU reads commands from a FIFO and runs them CPU fills the FIFO, GPU consumes it There is a lag between CPU and GPU Depends on the FIFO length and run-time timings If the FIFO is typically empty, the CPU is bottleneck But there’s no lag If the FIFO is typically full, the GPU is bottleneck This allows CPU to do “other stuff” while GPU works High-performance games require paying attention
5
GPU render algorithm Convert all vertices into an internal representation Run the vertex pipeline or vertex shader Group internal vertices into triangles Clip (cut) triangles to the view frustum Rasterize the triangles into pixels Convert the pixels into colors Run the pixel pipeline or pixel shader Apply colors to the output render target
6
What does the state specify? It specifies how to perform all rendering operations: Input data (geometry, textures…) Output data (render target) Vertex pipeline transform Grouping, clipping and rasterization parameters Pixel pipeline transformation Z-buffer and stencil operation values Blending formula: applying colors to render target Sometimes, multiple states affect a single operation Sometimes, a single state affects multiple operations
7
Vertex and pixel pipelines Why move calculations between them? It’s good for balancing the computation load Typically there are many more pixels than vertices Pixel stage allows us to add some detail in a balanced way, without multiplying the calculations Mind the extreme cases: Far-away object Many vertices with fewer pixels Close-up object Many pixels with fewer vertices State-based or fully programmable (shaders)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.