English 中文(简体)
XNA Antialias question!
原标题:

I ve got problems with XNA and antialiasing. I can activate it using

        graphics.PreferMultiSampling = true;
        graphics.ApplyChanges();

however - it s only 2x antialiasing. Even if I set

graphics.GraphicsDevice.PresentationParameters.MultiSampleType = MultiSampleType.SixteenSamples;

it stays only 2x antialiasing. If i go to my graphics driver settings (NVIDIA GeForce 9800 GT) and set Antialiastype from Application decides to 16x, then I get nice and clean antialiasing. But if it s set on Application decides i don t get more than 2x

Anyone an idea why? Thanks!

最佳回答

I would try following these instructions on MSDN. In this thread at the XNA forums, Shawn Hargreaves tells another person (who is using code similar to yours) that this isn t the way to setup multisampling. He indicates that it s supposed to be specified in the parameters when you create the device. The MSDN article shows which event to handle to set up antialiasing at the proper time. This thread also basically indicates the same thing: that you should perform this type of setup in the event handler.

Also, I believe the MSDN example checks for 4XAA and 2XAA, so you may have to change the code to support 16XAA. While looking into this though, I saw this quote in the first XNA thread I linked:

Also, I know of no GPU that supports 16 sub-samples for multisampling. For example the mode names "16x" that you see on Nvidia s 8000 and 9000 series actually uses 4 samples, with a quality level of "2" IIRC. The most those GPU s support is 8 sub-samples, which corresponds to the "8xQ" and "16xQ" settings.

So, I don t know exactly what settings you ll have to use to get 16XAA; you may have to play around with it a bit.

问题回答

暂无回答




相关问题
copying a texture in xna into another texture

I am loading a Texture2D that contains multiple sprite textures. I would like to pull the individual textures out when I load the initial Texture to store into separate Texture2D objects, but can t ...

XNA Antialias question!

I ve got problems with XNA and antialiasing. I can activate it using graphics.PreferMultiSampling = true; graphics.ApplyChanges(); however - it s only 2x antialiasing. Even if I set ...

Take screen shot in XNA

How can I take a screen shot of the screen in XNA? Is it possible without System.Drawing.Graphics.CopyFromScreen or Win32API? If it s not possible, Is there any way to draw a System.Drawing.Bitmap to ...

XNA .Fbx textures

I m using the standard .fbx importer with custom shaders in XNA. The .fbx model is UV wrapped properly and is textured appropriately when I use BasicEffect. However when I use my custom effect I have ...

Can t install XNA

I m trying to install XNA. When the installation starts I got an error that says "XNA GSE 1.0 refresh requires Visual C# 2005 express edition sp1..." I use Windows 7 and I have Visual Studio 2008 &...

Is there a 3D equivalant to clamp in XNA?

I m building a 3D game but i only plan on using a 2D perspective thus not taking the z axis into the equasion, i want to be able to limit the movement of one of my models so it doesn t move out of the ...

Fetching the vertices from the backbuffer (HLSL) on XNA

Hello and sorry for the obscure title :} I`ll try to explain the best i can. First of all, i am new to HLSL but i understand about the pipeline and stuff that are from the fairy world. What i`m ...

Simple XNA 2d physics library

Working on a 2D project and wanted some recommendations on a simple 2d physics library for use in C# with the XNA framework. I was looking at Farseer or physics2d. Anyone have any other suggestions? ...

热门标签