liveBook · Manning

Rasterization

As explained in Systems Programming with Zig

Rasterization is the process of converting geometric representations into pixels on a grid.

Rasterization converts geometric points into pixels on a grid. In OpenGL, it is the central pipeline for turning supplied geometry into an image; higher-level tools such as Raylib instead offer drawing functions like DrawTriangle and DrawRectangle. section 7.1.2

The pipeline proceeds in stages:

  • A draw call supplies geometry and specifies what kind and how many objects to draw. section 7.1.2
  • A vertex shader manipulates vertices, from moving them to projecting a 3D scene. section 7.1.2
  • The rasterizer turns shapes into fragments; a fragment shader assigns color to each visible pixel. section 7.1.2
  • The fragments are reassembled into an image. section 7.1.2
Figure 7.1 The rasterization pipeline
CH07 F01 hinsonhasty

Use the pipeline diagram to follow the stages from geometry to image. section 7.1.2

How Systems Programming with Zig covers it

How deep it goes
Traces the pipeline from draw call through shaders and fragment assembly, without detailing shader implementation.
Examples
Uses triangle and rectangle drawing, vertex movement or 3D projection, and fragment coloring effects as examples.
What you can do after
Understand how geometry passes through the rasterization pipeline to become a colored image.
How it connects
Connects rasterization to OpenGL, GPUs, vertices, vertex shaders, fragment shaders, and draw calls.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Systems Programming with Zig. The section links point to the parts of the book it draws on.