Skip to content
FoundationSource checked

Rasterization

Converts geometric shapes into pixels on a screen.

Quick Facts

Compact metadata for implementation and discovery.

Category
Rendering
Difficulty
Intermediate
Family
Image Synthesis
Tier
Foundation
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
11
Code example
Not ready
Visualization
Ready

Overview

Rasterization projects primitives such as triangles onto the image plane and fills the pixels they cover.

Core Concepts

screen-space primitivefragmentattribute interpolationfill rule

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(p)

Average

O(p)

Worst

O(p)

Space

O(p)

When to Use

  • Use it for fast image generation from triangles, lines, or other primitives.
  • Use it when real-time performance matters more than physically complete light transport.
  • Use it when visibility and interpolation can be handled per fragment.

When Not to Use

  • Avoid it when global illumination or physically accurate light paths are the main requirement.
  • Avoid it when the scene cannot be represented as rasterizable primitives.
  • Avoid relying on it alone for effects that require secondary visibility, such as reflections through multiple bounces.

What It Does

  • Projects geometry to screen space
  • Fills covered pixels

Use Cases

  • Real-time graphics
  • Game rendering
  • Drawing vector shapes

Inputs

  • Geometry
  • Camera or projection
  • Surface attributes

Outputs

  • Pixels or fragments

Key Formulas (1)

Barycentric interpolation

point = w1 · vertex1 + w2 · vertex2 + w3 · vertex3
point = w1 * vertex1 + w2 * vertex2 + w3 * vertex3

Interpolates positions or attributes across a triangle when the weights are inside the triangle.

Pseudocode

  1. 1.Transform vertices into screen space
  2. 2.Find the pixels covered by each primitive
  3. 3.Interpolate attributes for each covered pixel
  4. 4.Shade each fragment
  5. 5.Write visible fragments to the image

Canonical Example

Input
triangle vertices in screen space: (1,1), (5,1), (3,4)
Output
the set of pixels covered by the triangle
Explanation
Rasterization identifies the pixels inside the projected triangle and produces fragments for shading.

Implementation Notes

  • Transform vertices into clip space, perform clipping, then map to screen coordinates.
  • Use a consistent fill convention for pixels on triangle edges.
  • Interpolate depth and attributes with the same perspective rules used by the pipeline.

Common Pitfalls

  • Mixing coordinate spaces between object, world, clip, and screen coordinates.
  • Ignoring sampling and edge rules, which can create cracks or missing pixels.
  • Forgetting that rasterization alone does not model indirect lighting.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Show a triangle projected and filled as a grid of pixels.

Rasterization mechanism walkthrough step 1 of 5
Step 1 of 5: Transform vertices into screen space
triangle-to-pixels

Notes

Rasterization is usually paired with a visibility method such as z-buffering.

Sources (1)

What each reference supports for this entry.

Real-Time Rendering

Book

Computer graphics reference covering rasterization and real-time rendering pipelines.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Deferred shading starts with rasterized geometry buffers.

Forward rendering shades objects during rasterization passes.

Alternative toRay Tracing

Rasterization and ray tracing are different rendering pipelines.

Scanline rendering is a classic rasterization strategy.

Raster pipelines commonly use depth buffering for visibility.

Related Algorithms

Tags

GraphicsGeometryVisibilityClassic