PDA

View Full Version : enumerating supersampling and multisampling modes



Stephen_H
12-02-2005, 04:58 PM
First some terminology. The way I define things:

supersampling - multiple material samples per pixel each with its own coverage computation

multisampling - multiple coverage samples per pixel, but all sharing one material sample

Is that right? The ARB_multisample extension seems rather purposefully ambiguous, but I'm guessing that most hardware today has a very specific idea of what multisampling is.

Now the question:

When I'm enumerating the pixel formats available using wglGetPixelFormatAttribivARB, I'm using WGL_SAMPLE_BUFFERS_ARB and WGL_SAMPLES_ARB to get a list of the possible multisample modes. I'm assuming these are all multisample and not supersample (is that right?).

Are there any supersampling pixel formats to pick from and how does one do so in OpenGL? I would like to present my users a list of options to pick from as I've seen in some popular games. I'm assuming they're using DirectX to make the distinction between MSAA and SSAA modes.

Also, because of the way the extensions were worded, I enumerated the MSAA modes that had WGL_DRAW_TO_PBUFFER_ARB set to TRUE separately from those that don't. The odd thing is that on my Quadro3000 (77.77), all the MSAA modes are pbuffer ones, which seems really odd to me.

Humus
12-04-2005, 03:02 PM
There's no supersampling built into either OpenGL or DirectX. If you need to supersample, you need to implement that yourself from the application side by using a larger render target and downsampling yourself.

Dark Photon
12-05-2005, 06:04 AM
Stephen_H:
supersampling - multiple material samples per pixel each with its own coverage computation

multisampling - multiple coverage samples per pixel, but all sharing one material sample

Is that right?Pretty close, though keep in mind you can do both within a pixel. For example, dice the pixel 2x2 where each quarter is a shading (material) sample, and then dice further where each sub-quarter is a geometry (coverage) sample. The GeForce6 cards do something like this IIRC.


Are there any supersampling pixel formats to pick from and how does one do so in OpenGL? I would like to present my users a list of options to pick fromThis is one of those features that's not well integrated with OpenGL. Antialiasing activation and mode selection (AFAIK) is a bag of vendor-specific bolt-ons. For NVidia on Linux, see the documentation for __GL_FSAA_MODE environment variable in the driver README.txt. Also see the MULTISAMPLE_FILTER_HINT and the SAMPLE_BUFFERS and SAMPLES attributes to glXChooseVisual (or equivalent on WGL). I don't know what ATI's scheme is.

I'd like to be proven wrong on this, so if you know of a robust method for cross-vendor antialiasing mode selection, please chime in.

Dark Photon
12-05-2005, 06:08 AM
Humus:
There's no supersampling built into either OpenGL or DirectX. If you need to supersample, you need to implement that yourself from the application side by using a larger render target and downsampling yourself.With NVidia drivers you can supposedly tell the driver to do supersampling (and a multi/super-sampling mix) with a start-up environment variable.

__GL_FSAA_MODE GeForce FX, GeForce 6xxx,
GeForce 7xxx, Quadro FX
------------------------------- -------------------------------
0 FSAA disabled
1 2x Bilinear Multisampling
2 2x Quincunx Multisampling
3 FSAA disabled
4 4x Bilinear Multisampling
5 4x Gaussian Multisampling
6 2x Bilinear Multisampling by 4x
Supersampling
7 4x Bilinear Multisampling by 4x
Supersampling
8 4x Bilinear Multisampling by 2x
Supersampling (available on
GeForce FX and later GPUS; not
available on Quadro GPUs)

Humus
12-05-2005, 07:59 PM
Originally posted by Dark Photon:
I'd like to be proven wrong on this, so if you know of a robust method for cross-vendor antialiasing mode selection, please chime in.For multisampling there's GL_ARB_multisampling. It's cross-vendor and perfectly fine speced and everything. Supersampling on the other hand it not standardized in any way in either API.