Rendering - curv3d/dali GitHub Wiki
Rendering Theory
Immediate mode vs Retained mode
- In immediate mode, each graphics call paints a shape on the frame buffer.
- In retained mode, you build a data structure describing a scene, then render the entire scene.
- From MPVG:
Many real-time renderers rasterize shapes independently and blend results into the output image. This policy of immediate-mode rendering is analogous to the z-buffering algorithm for 3D rendering. As an optimization, many such systems approximate antialiasing by transforming per-pixel coverage into transparency prior to blending. This conflation leads to incorrect rendering of correlated layers [Porter and Duff 1984]. Solving this problem within the immediate-mode paradigm requires allocating memory for multiple samples per output pixel, or perhaps going over the input multiple times [Kilgard and Bolz 2012]. We keep the entire illustration in GPU memory, in retained mode. All layers in the illustration are sampled in a single pass without conflation, much like 3D rendering by ray tracing accelerated with a space-partitioning data structure.