Jump to content
  • Advertisement
Sign in to follow this  
ThunderSoul

.x file model anti-aliasing

This topic is 3936 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

Hi! I have imported a .x model into my C# application and I would like to anti-alias the model... I've been looking around for a while on how to do so, but I was unable to find answer... Any help would be appreciated :) Thank you

Share this post


Link to post
Share on other sites
Advertisement
Are you familiar with the term multisample? When you create your render target you can specifiy a multismaple type which will enable anti aliasing by default. If you later wish to render without multisample you could set the render state, D3DRS_MULTISAMPLEANTIALIAS, to false.

But make sure your card supports it. Use CheckDeviceMultiSampleType for this purpose.

Share this post


Link to post
Share on other sites
Quote:
Original post by ThunderSoul
Hi!
I have imported a .x model into my C# application and I would like to anti-alias the model... I've been looking around for a while on how to do so, but I was unable to find answer... Any help would be appreciated :)
Thank you


Multisampling is applied to a rendertarget or backbuffer, not to a certain object. You'll need to make your backbuffer multisampled by setting the proper members in the PRESENTATION_PARAMETERS struct when creating the device.

Share this post


Link to post
Share on other sites
Quote:
Original post by sirob
Multisampling is applied to a rendertarget or backbuffer, not to a certain object.


Actually, its both :-).

Yes, multisampling must be specified as part of the back buffer (and depth buffer) when creating those surface if you want to use it. However, once a buffer has multiple samples, then you can either use multisampling or not depending on how you set RS Multisample Antialias.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!