By way of example, the merge process inspects an entire image, to determine whether the image (e.g., the merged rendering results) meets a particular condition (e.g., a halting condition). Such a determination may be made, e.g., by inspecting the convergence or quality of each pixel. If the rendering results for a particular pixel achieve a particular quality level (e.g., a quality threshold specified by the artist), then the particular pixel is considered to be completed. As described earlier, the more samples that are traced into a pixel, the more the color of the resulting pixel should approximate the correct final color (the “ground truth”). In this regard, the artist may set a quality threshold governing how closely the computed color of the pixel is required to match the final color before the pixel can be considered as being completed.
In at least one embodiment, rendering is determined as being completed based on tracking a total number of pixel samples (uniform sampling case). Here, the total number of samples in each pixel may be tracked independently. Rendering may be determined as being completed when all pixels reach a maximum number of samples (e.g., a user-defined value). By way of example, such a maximum number of subpixel samples may be equal to 64 or 128.
In at least another embodiment, rendering is determined as being completed based on tracking pixel variance (adaptive sampling). Here, a value of pixel variance may be tracked for each pixel. If the pixel variance for each pixel is below a particular value (e.g., a user-defined value), then rendering may be determined as being completed. By way of example, such a value may be a value in a range between 0.0 and 1.0, where a smaller floating-point value effectively requires a higher level of quality or fidelity.