1 / 7

UW Extension Certificate Program in Game Development 2 nd quarter: Advanced Graphics

UW Extension Certificate Program in Game Development 2 nd quarter: Advanced Graphics. The GPU. Goals. Understand how the GPU works (high-level) Review the basic rendering pipeline. GPU as a state machine. GPU records state and renders based on that state Examples of state:

Download Presentation

UW Extension Certificate Program in Game Development 2 nd quarter: Advanced Graphics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. UW ExtensionCertificate Program inGame Development 2nd quarter:Advanced Graphics The GPU

  2. Goals • Understand how the GPU works (high-level) • 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)

More Related