Sign in to follow this  
Styves

NFAA - A Post-Process Anti-Aliasing Filter (Results, Implementation Details).

Recommended Posts

"[color="#1C2837"][size="2"]The shader runs at ~1ms, which I believe is faster than MLAA or SRAA (MLAA apparently needing all 6 SPUs on the PS3 just to run)"[/size][/color]
[color="#1C2837"] [/color]
[color="#1C2837"][size="2"]What is the hardware ? On recent hardware MLAA usually runs < 0.15 ms.[/size][/color]
[color="#1C2837"][size="2"]Current MLAA GPU implementations are pretty fast ( even on "old" console GPU like 360 one ). Afaik Sony's algorithm divides the MLAA task on as many SPU as possible because it's more a "brute force shape search' compared to GPU implementation.[/size][/color]
[color="#1C2837"][size="2"]Have a look at [/size][/color][url="http://www.iryoku.com/mlaa/"]http://www.iryoku.com/mlaa/[/url] for MLAA GPU performances report.
Thanks for sharing,

Regards

Share this post


Link to post
Share on other sites
Oops, I meant ~0.1. lol my bad.

I've tried the approach on that page but I didn't get very good results. Nothing compared to the images they show. I am limited in how I can implement it, which is probably the cause of the poor quality (I can't output 2 channels for the first pass, stuff like that).

[color="#555555"][quote]Typical execution times are 3.79 ms on Xbox 360 and 0.44 ms on a nVIDIA GeForce 9800 GTX+, for a resolution of 720p. Memory footprint is 2x the size of the backbuffer on Xbox 360 and 1.5x on the 9800 GTX+. Meanwhile, 8x MSAA takes an average of 5 ms per image on the same GPU at the same resolution, 1180% longer (i.e. processing times differ by an order of magnitude). The method presented can therefore challenge the current gold standard in real time anti-aliasing.[/quote][/color]

I hadn't measured the performance in-depth until after that post, 0.1ms was a guess. But I've crunched the numbers: In a semi-optimized state NFAA runs at < 0.3ms in a standard scene (33ms) at 1920x1080 on a my GTX260. That's twice the resolution of the MLAA test while still being faster. I wasn't too far off :D. With a few more optimizations I'm sure I can get this to perform quicker, there's definitely room for improvement.

Share this post


Link to post
Share on other sites
a compleate new way with good results


simple in the last post pass before you present the screen,, can allso be done as a sprite effect



how to use put your alpha in and wacth the magic

float4 outColor = tex2d(scene,texcoord);

outColor.a = AntiAliasingAlpha(outColor.a);

return outColor;

you can allso use this for normal buffer as well if you are render out small normal and depth buffer and then you can upscale * 2 , i only use the color buffer

so if you render out 640x360 you can present the final image on screen in 1280x720


////////////////////////////////////////////////////////////////////////////////////////////////////////
float blurThreshold = 0.9f;
float AntiAliasingAlpha(float alpha)
{
float rho = alpha;

float sat = 0.8; // saturation
float invsat = 1 - sat;

float a = invsat * rho * sat;
// Uncomment the following line to remove edge blurring,, try othere values
blurThreshold = 1;

if( rho < blurThreshold )
{
a = 1.0f;
}
else
{
float normrho = (rho - blurThreshold) * 1 / (1 - blurThreshold);
a = cos(normrho * 3.14159/2);
}

return a;
} Edited by TheUndisputed

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