In order to reduce visible artifacts, and improve the perceived quality of an image, we need to supersample it, i.e. trace multiple rays per pixel, each with a slightly different position within the area of that pixel. The naive approach of just dividing the area into n even subpixels increases quality, but unfortunately has still artifacts. Instead, one must sample at "random" point on the pixel. This will turn artifacts into "noise", which the human brain perceives as more pleasant (since it is exposed to it constantly, where as aliasing has no counter part in the physical world)
Just sampling a random point on the pixel n times will yield the desired results, however, it will most likely over sample specific areas, while under-sampling others. In order to counter that, we need samplers that sample random enough to turn aliasing into noise, but even enough to properly sample every region, in order to get maximum quality out of a minimal amount of samples.
There are many different sampling methods for this. We currently implement the naive regular and random sampling approach, a stratified sampling approach, as well as an Zero-Two sequence sampler (WARNING!!!! FLASHING COLORS!!!!! ok, it's actually [0,2]-sequence, but look how happy she is that we implemented her )(again, don't mind it when you don't get the reference)
The sampler is not directly visible on the image, but when you compare the images below, which were all taken at the same sampling rate, you will quickly see a significant difference in perceived quality, tough weather you prefer the Stratified or the Zero-Two sampler may be up to you (if you prefer one of the others you have shitty taste tough, but whatever floats your boat)
We mainly used the Zero-Two sampler, since it's superb distribution allows us to get away with only 64 samples per pixel, what sounds like much, however, normally samples are counted in magnitudes of thousands and more for production images.
Stratified sampling in a nutshell uses various statistical models to ensure that for a given area A, we distribute n samples in a way, that in each sub-area A' there is exactly 1 sample. So, what we are doing is we divide the area into a finite amount of subareas (stratum), and sample each of them independently. This gives us a well-distributed sampling pattern in regard to the full image, however, sample points can still be near the same edge between stratums, which leads to over-and under-sampling
The Zero-Two sequence sampler improves on this by using parts of the Sobol-Sequence, arcane invocations, and a touch of black magic, to ensure that the samples are ALSO well-distributed in regards to each other, i.e. the pattern in well-distributed in all possible divisions of the image.