Final Accumulation

Despite filtering, the image is still not ready for final display. One more step is needed, and that is final accumulation with spatial filtering.

For each pixel in the filtering buffer at the beginning (top left) of each supersample block (SSxSS), a spatial filter is applied and the resulting value is written as a single pixel to the final output image.

The spatial filter is of a fixed width and type specified in the original Xml. It multiplies the filter values by the pixel values of all pixels extending forward and down by the length of the filter, and sums them to a final value. This final value will most likely be out of range, so further color correction is necessary. Gamma correction is applied and the final pixels are written to the output image buffer as 16 byte pixels, which are comprised of one 32-bit float for each RGBA channel. Converting these into a format-specific pixel type is done when saving to disk.

If early clipping is specified, the color correction is applied before the spatial filter.

The process is done.