PDA

View Full Version : a question about the "Varying" storage qualifier



qqca
11-15-2007, 05:06 PM
hi,

About the "Varying" storage qualifier, the OpenGLES Shading Language specification section 4.3.5 says "If single-sampling, the interpolated values is for the fragment center. If multi-sampling, the interpolated value can be anywhere within the pixel, including the fragment center or one of the fargment samples."

Can anybody explain what does the single sampling and multi-sampling mean here?

Thanks,

Mike

Xmas
11-16-2007, 04:39 AM
Multisampling anti-aliasing, a method to reduce aliasing artifacts by taking several samples per pixel and averaging them to get a final result.

It can be enabled by creating an EGLsurface with an EGLconfig that has the attributes EGL_SAMPLE_BUFFERS = 1 and EGL_SAMPLES = n, where n is the number of samples you want per pixel. 2 and 4 would be typically supported values for n.