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 clamped to the valid range of 0-255 and written to the output image buffer.

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

The process is done.