Roughly speaking, what the Supersampling Anti-Aliasing method does is:
- For each pixel in the image to render
- "Split" the pixel of a target image, usually in 2, 4, 8 or 16.
Actually this step is more: pick the 2, 4, 8 or 16 locations ("samples") inside the pixel
- Compute the color that the image will have at each of those locations (sample or "split part").
So instead of only computing the color that the image will have in that single pixel, we compute 2x, 4x, 8x or 16x times a similar value
- Compute the average of all the 2, 4, 8 or 16 sample colors to decide the final color or the initial pixel
You can see that Super-sampling cost is proportional to the cost of computing one pixel's color in the image. Therefore it depends on the cost of shading.
It also depends on the number of pixels, i.e the resolution of the image.
In the context of Ray-Tracing applications, this means that 2, 4, 8 or 16 times more rays will have to be computed.
In the context of GPU-accelerated graphics computation, this means that 2, 4, 8 or 16 times more pixel shaders ("fragment programs") will be executed.
Now roughly speaking, what the Multisampling Anti-Aliasing method does is:
- For each pixel in the image to render
- Pick 2, 4, 8 or 16 locations ("samples") inside the pixel
- For each primitive (triangle) in the scene (actually, only for those that overlap the pixel):
- Determine which of these samples are covered by the current triangle
- If there is at least one such sample, compute a single color of the contribution of that triangle to the pixel, and store it for each sample covered
The worse case happens if each sample is overlapped by a different triangle ; in that case the color must be computed for each triangle
- Compute the average of all the gathered sample colors to decide the final color or the initial pixel
You can see that evaluating the performance of Multisampling Anti-Aliasing is more complicated than that of Supersampling, since it also depends on the topology of the scene (the size and shape of the triangles).