Graphics Processors Vector math accelerators external to CPU Often with separate memory ~Every computer has a GPU in some form Limited API access Direct3D & OpenGL Starting to see OpenCL, CUDA, DirectCompute… Wildly different internal architectures
History of Consumer 3D <1999: OpenGL, Direct3D, niche APIs 2000: Direct3D 7 – “fixed function”, multitexturing 2001:Direct3D 8 – limited programmability 2003: Direct3D 9 – general programmability 2011: finally on the web!
Modern GPUs Buffers of data… textures, vertex arrays … and code that runs on them Vertex shaders, pixel shaders
Modern GPUs (con’t)
Shaders Small programs: Input: Vertex attributes Textures Output: Pixels on screen Syntax varies across platforms But same basic functionality