Skip to main content

Module normal_map

Module normal_map 

Source
Expand description

CPU software rasterizer for FLAME normal maps.

Produces an RGB image where each pixel encodes the interpolated surface normal at that point: RGB = (normal.xyz + 1) / 2 * 255.

§Performance Optimizations

This module includes several performance optimizations:

  • SIMD-accelerated vector operations using portable_simd
  • Tile-based rasterization for improved cache locality
  • Incremental edge evaluation to reduce computation
  • Inline hints on hot path functions
  • Pre-computed reciprocals to avoid divisions in inner loops

Structs§

Camera
Simple pinhole camera for rendering.
NormalMapRenderer
CPU rasterizer that renders per-vertex normals of a Mesh into an image.