Maximum antialiasing mode.

Hello.

When I use GeForce 8800 I can use 16x Antialiasing. When I use GeForce 480 I can use 32x Antialiasing. Tell me please, how can I know max solution for Antialiasing in same videocard (programm solution) in Windows and Linux and MacOS.

P.S. Please, use simple words, I bad speak English.

Some times ago, I use MAX_SAMPLES. But if I right understand, it is ‘Count (# Color/Z/Stencil samples)’, but I want to know ‘Quality Value’.
(words in ‘’ are from http://developer.nvidia.com/object/coverage-sampled-aa.html).

Thanks.

I don’t know how to achieve that in other OSs, but in Windows I’m doing exactly what you have mentioned:

  • try to set highest possible AA value while creating GL rendering context.

In Windows it is achieved by choosing pixel format. Function wglChoosePixelFormatARB() as a second parameter requires an array of integer values which are pairs of enumerated attributes and their corresponding values. Attribute WGL_SAMPLES_ARB defines AA value. Start, for example, with value 32 and call wglChoosePixelFormatARB(). If that format is not supported, returned value will not be valid. In that case, divide previous WGL_SAMPLES_ARB value with 2, and iteratively call function again until it succeeds.

For MSAA textures/FBOs:


MSAA Textures:
  GL_MAX_COLOR_TEXTURE_SAMPLES = 32
  GL_MAX_DEPTH_TEXTURE_SAMPLES = 32

on a GTX480.

For the window framebuffer, that’s where it’s vendor-specific magic. Which modes are valid depends on not only vendor and GPU but driver version as well. On NVidia/GTX480/Linux (260.19.04 drivers):


> nvidia-settings --query=fsaa --verbose

  Attribute 'FSAA' (irad0012:0.0): 0.
    Valid values for 'FSAA' are: 0, 1, 5, 7, 8, 9, 10 and 12.
    'FSAA' can use the following target types: X Screen.
    
    Note to assign 'FSAA' on the commandline, you may also need to assign
    'FSAAAppControlled' and 'FSAAAppEnhanced' to 0.
    
    Valid 'FSAA' Values
      value - description
        0   -   Off
        1   -   2x (2xMS)
        5   -   4x (4xMS)
        7   -   8x (4xMS, 4xCS)
        8   -   16x (4xMS, 12xCS)
        9   -   8x (4xSS, 2xMS)
       10   -   8x (8xMS)
       12   -   16x (8xMS, 8xCS)

So as you can see, we’ve got a mix of MSAA, CSAA, and SSAA choices here.

Thanks a lot.