Sign in to follow this  
Carnevil_

Full-scene anti-aliasing question

Recommended Posts

So I'm currently trying to implement full-scene anti-aliasing into a program. I'm not trying to reduce jaggies on the edges of polygons (that works fine), but instead what I'm trying to do is smooth out the appearance of textures at a distance, like Figure 1 on this Wikipedia page. On my video card's control panel: I have 5 options for anti-aliasing: App controlled, none, 2x, 4x, and 8xS. My goal is to get my app to use the "8xS" setting. Is that possible? Right now I'm doing the typical run-of-the-mill setting of multisample type/quality level in the present parameters to the highest value my video card allows, and setting D3DRS_MULTISAMPLEANTIALIAS to true. However, this only results in the elimination of jaggies - not the removal of texture distortion at a distance. What more do I have to do to take full advantage of my card's anti-aliasing capabilities? One final thing: Setting my anti-aliasing setting in my card's control panel to 8xS, and then running my program does have a considerable effect on the full scene's anti-aliasing (and on my performance :P ). So, when the option is set to "application controlled", I know for sure that I'm not making the app enable 8xS.

Share this post


Link to post
Share on other sites
Quote:
Original post by Carnevil_
That's similar to what I'm after, but this is something different. I already have anisotropic filtering implemented.


Are you sure?
Being anisotropic filtering should be offering the feature you want.

An example of anisotropic filtering:
http://img37.imageshack.us/img37/9508/lotroanisotropic.jpg

Share this post


Link to post
Share on other sites
Yes, I'm positive. I've taken some screenshots of my app to demonstrate what I'm talking about. In one shot, I've set the 8xS anti-aliasing setting on my video card's control panel. In the other, it's been set to "none". In both shots, anisotropic filtering is set to 16x, and I've disabled mipmapping to exaggerate the effect of the card's anti-aliasing.

With 8xS:
Free Image Hosting at www.ImageShack.us

Without 8xS:
Free Image Hosting at www.ImageShack.us

Share this post


Link to post
Share on other sites
Have you tried turning off anisotropic filtering? Having it turned off will give distant things a smoother feel (albeit with less detail on acute angles).

Share this post


Link to post
Share on other sites
What part of that screenshot is bothering you? It looks normal to me. If it is the alpha-tested stuff that's the problem, normal hardware anit-aliasing wont anti-alias alpha-tested pixels on its own..to do that you should use what's called "alpha-to-coverage".

Have tried super-sampling? Render the scene at twice the final resolution and then shrink it down...this will smooth everything out somewhat, but it's costly.

Share this post


Link to post
Share on other sites
Quote:
Original post by Carnevil_
Yes, I'm positive. I've taken some screenshots of my app to demonstrate what I'm talking about. In one shot, I've set the 8xS anti-aliasing setting on my video card's control panel. In the other, it's been set to "none". In both shots, anisotropic filtering is set to 16x, and I've disabled mipmapping to exaggerate the effect of the card's anti-aliasing.

With 8xS:
Free Image Hosting at www.ImageShack.us

Without 8xS:
Free Image Hosting at www.ImageShack.us


What a nice scene! Can i have it??

Share this post


Link to post
Share on other sites
Quote:
Original post by Matt Aufderheide
What part of that screenshot is bothering you? It looks normal to me. If it is the alpha-tested stuff that's the problem, normal hardware anit-aliasing wont anti-alias alpha-tested pixels on its own..to do that you should use what's called "alpha-to-coverage".

Have tried super-sampling? Render the scene at twice the final resolution and then shrink it down...this will smooth everything out somewhat, but it's costly.


Nothing bothers me in the first shot, but in the second shot, the jaggies, moire patterns on the grate, and overall pixely look all bother me. None of these problem areas have any alpha on them (except for the grate, but the source of the problem isn't its alpha - I get the same moire patterns on non-alphaed pixels).

I've tried super sampling, but when I try to create a render target texture twice as big as the back buffer, it fails. Plus, if I try to render to a texture that's the same size as the back buffer, my anti-aliasing doesn't work at all. I've tried creating a new depth/stencil buffer and using that when rendering my full screen quad, but it doesn't fix the problem.

XVincentX: I'm working on a new FPS currently codenamed "Project Vega". You can follow it here. Glad you like it :)

Share this post


Link to post
Share on other sites
Anisotropic filtering (and trilinear filtering, for that matter) only makes sense if you have mip-mapping enabled. Otherwise it just becomes regular bilinear filtering.

The whole point of mip-maps is to eliminate minification artifacts - which are the sparkly/moire patterns you're seeing. The reason SSAA works is because you're rendering at a higher resolution which takes more samples and reduces these minification artifacts (since textures take up more pixels at a higher resolution). The 8xS AA mode uses SSAA, which is why you're seeing the improvements. But SSAA is incredibly wasteful seeing you can just enable mipmaps and achieve better results!

Share this post


Link to post
Share on other sites
Alright then. Honestly, with mipmapping enabled, I don't notice too much of a difference between having anti-aliasing off and having it set to 8xS. I won't worry about this anymore. If people really want this costly anti-aliasing enabled, they can just do it explicitly at their video card's control panel.

Share this post


Link to post
Share on other sites

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