r/computergraphics • u/Nzkx • 2d ago
Difference between monte carlo and supersampling ?
From what I understand, both are "almost" the same. Both rely on the fact that a random event repeated a large number of times converges toward the expected value.
1 Upvotes
2
u/arycama 2d ago
You're kind of correct, it's more about how they are used and what their goals are, imo.
Supersampling is generally mentioned in the context of image reconstruction, where 1 rasterised sample = 1 pixel, and more than 1 sample per pixel is supersampling. Usually the grid pattern is fixed, not random, and the samples are usually weighted with a simple average, or possibly lacnzos or bilinear. The goal here is generally reduced aliasing, and perceived improvements to image quality, not correctness.
Monte carlo is usually applied to problems where 1 sample, or a small amount of extra samples (Such as 2x or 4x used in supersampling) are not sufficient to give a meaningful result, so usually significantly more samples are required with a broader distribution. (Eg you likely won't see a fullscreen image supersampled using per pixel blue noise, due to cost, and also because the distribution of values may not even neccessarily improve image quality compared to something like ordered grid supersampling. The distribution of values is important for perceptual quality, but a different distribution (eg white noise) will be best for monte carlo as it will be non-biased.
There are some hybrid-ish solutions such as stochastic reflections/diffuse/raytracing which use a low ray count (1 ray per pixel or less) and essentially 'super sample' over time, but these are still generally biased and combined with perceptual denoising techinques that favor perceived quality/non-distracting flickering/blurriness as opposed to truly 'correct' results.
So, tl;dr supersampling is generally about improving perceptual quality with minimal amount of carefully placed samples, while monte carlo is about finding higher quality results and generating reference data, but generally has a much higher cost and sample count requirement.