1
$\begingroup$

As I understand it, with glEnable(GL_MULTISAMPLE), glEnable(GL_SAMPLE_SHADING) and glMinSampleShading(x), we can enable multisample antialiased (MSAA) rendering to a multisample frame buffer. The value of the floating-point x, between 0.0f and 1.0f, imposes a lower bound on the number of fragment shader invocations per sample points. Without setting glMinSampleShading, it seems that the fragment shader is invoked once per pixel per primitive, and its output is copied to each of the sample points in the pixel that are covered by the primitive. In this case I guess that the interpolation takes place at the centre of the pixel, which might not be one of the multisample sample points.

Using values of x greater than 0.0f, we can force the fragment shader to be invoked more than once per pixel, and the output of each invocation to be shared only with a proper subset of the samples. I guess that these subsets form a partition of the set of all samples. My questions are, what is that partition (how does it look, on a diagram of the sample positions) and for each subset, where is the corresponding point, at which the fragment shader carries out interpolation ? Is it one of the sample points ? Or their centroid, perhaps ?

As far as I know, the answers are implementation dependent, but does anyone know the answers, in any particular cases ?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.