.x file model anti-aliasing

Started by
3 comments, last by ThunderSoul 16 years, 6 months ago
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
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.
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.
Sirob Yes.» - status: Work-O-Rama.
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.

My free book on Direct3D: "The Direct3D Graphics Pipeline"
My blog on programming, vintage computing, music, politics, etc.: Legalize Adulthood!

Thank you all for your replies, it has helped and I'm on my way to code this.
And yes, I know the concept of multi-sampling... ;)
See you

This topic is closed to new replies.

Advertisement