We talked about the GPU pipeline today. We looked at setting GPU state from the CPU and initiating draw calls. We focused on shaders, uniforms, and attributes but there is a lot more state that can be set and managed by the CPU.

Some things we will not be looking at but are good to know about are:

key takeaways

  1. CPU sets GPU state for each draw
  2. CPU can upload data to the GPU as buffers
  3. CPU can upload shaders, GPU programs to run at different phases of the pipeline
  4. CPU can instruct the GPU to interpret buffers as attributes which connects them to shaders and tells the GPU how many elements to read at a time
  5. CPU can upload uniforms which are values that are kept constant for all shader invocations
  6. Vertex shaders produce points in Normalized Device Coordinates (NDC) with optional "output" data associated with each point
  7. The Rasterizer is a fixed-function process that turns these NDC points into fragments based on CPU provided settings (e.g. primitive type)
  8. Fragment shaders run for each activated fragment from the rasterizer to compute a final color for that pixel

further reading / viewing