Sign in to follow this  

Anti-Aliasing

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

That article is a bit light on details - setting up for AA is a bit more involved than what is presented, and it does not address the issue of multi- vs. super-sample. Let me clarify a bit:

- Call CheckDeviceMultiSampleType with either D3DMULTISAMPLE_X_SAMPLES or D3DMULTISAMPLE_NONMASKABLE (you can probably figure out the other params to this call).

- Generally, the supersample modes are reported as D3DMULTISAMPLE_X_SAMPLES (supersample means an oversized backbuffer is downsampled to requested video res). This is considered old-school in DX9.

- The multisample modes are reported as D3DMULTISAMPLE_NONMASKABLE at some quality level n specified in CheckDeviceMultiSampleType (multisample means each pixel is drawn into a nxn multisample buffer, then resolved before drawing). This is the preferred way to do AA (at least according to nVidia).

- To complicate things further, some cards which can only do supersample will report their available modes as NONMASKABLE modes at some quality level.

In either case, the non-maskable modes make it difficult (or impossible) to report to the user the specific AA setting they are choosing. I just use low, med, or high, since "multisample, quality level 2" will just confuse people.

Now, if you are not doing auto depth/stencil, you must create your depth/stencil buffer with the same multisample type and quality level, a rather tedious process (involving CheckDeviceFormat, CheckDepthStencilMatch, and CheckDeviceMultiSampleType calls to verify a compatible depth/stencil buffer), but required for this all to work.

If you manage to get it all right, you're rewarded with FSAA, which for supersample modes will probably knock your frame rate right in half. Newer cards doing multisample can perform at nearly full speed.

Hope I got all that right ;)

joe
image space

Share this post


Link to post
Share on other sites
Actually, it's usually the other way around. Multi-sample hw can mask off samples, so these are the maskable modes with a specific sample count.

Non-maskable usually indicates either the hw doesn't want to let you turn off samples intra frame, most likely because it is super-sampling, or doing a multi/super hybrid.

Direct3D Multisampling

[Edited by - Coder on September 19, 2004 2:17:44 PM]

Share this post


Link to post
Share on other sites

This topic is 4836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this