Skip to main content
GameDev.net gamedev.net
🔒 Locked

MultiSampleQuality

Started by littlekid Jan 16, 2007 at 9:55 AM 1 replies 6.2k views
Original Post
littlekid
littlekid
What is the MultiSampleQuality used for? The SDK says it can be from 0 to 1 less than the value return from the device caps. What exactly does this parameter affects?
jollyjeffers
jollyjeffers
The exact details tend to be GPU-specific, but the basic idea (as I understand it) is that it allows the driver to express multiple patterns/modes for a given sample count.

e.g. you might have 4 samples, but you could have them arranged in 2 different ways therefore giving you 2 different qualities:

*| |*       |*|-+-+-      -+-+- | |   or  *| |*-+-+-      -+-+-*| |*       |*|


In reality it'll be more complicated, but thats the general idea.

Nvidia just put up a paper on their CSAA method for D3D which contains some tables of sample/quality levels - might give you a better idea.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
remigius
remigius
Here's some more info hidden in the What's new? section of the DX9 docs:

Quote:

Previously, there was only the D3DMULTISAMPLE_TYPE enumeration. Direct3D 9 retains this enumeration and adds the idea of a quality level for each element of the enumeration. The quality level indicates a trade-off between visual quality and performance by indicating the number of maskable samples (in the sense of D3DRS_MULTISAMPLEMASK).

An application should choose how many maskable samples it requires, and then consult pQualityLevels. If nonzero, this value indicates the number of quality levels the application can pass to the various creation functions through MultiSampleQuality. Because drivers expose all their multisample schemes as quality levels at D3DMULTISAMPLE_NONMASKABLE, you can enumerate all available multisampling schemes through this one type if your application does not need to mask samples.

The D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE caps bit has been retired. This bit used to mean that the multisampling method did not support write masks, and could not be toggled on and off between IDirect3DDevice9::BeginScene and IDirect3DDevice9::EndScene. Such nonmaskable methods are now exposed through D3DMULTISAMPLE_NONMASKABLE.

...

There is a different maximum for each number of maskable samples. For example, D3DMULTISAMPLE_4_SAMPLES might have three levels of quality, while D3DMULTISAMPLE_2_SAMPLES might have only one. There are at most eight levels of quality for each number of maskable samples (the driver is not allowed to express more). The quality ranges from zero to (*pQualityLevels - 1).


And there I was thinking setting up multisampling was simple :p

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.