Tag Archives: MLAA

FXAA vs MLAA

So, after searching to see how FXAA compares to MLAA speed-wise, and not finding any results, I decided to check it out for myself. Using the FXAA code from the NVIDIAs SDK 11, and Jimenez’s MLAA, the results?

FXAA (lowest setting) .833 ms

MLAA (medium settings) .049 ms + .113ms + .170ms = .332 ms     (each timing is a step in the MLAA process)

I did not even compare the other settings as it seemed pointless to me, the MLAA implementation was far superior to FXAA in both speed and quality. The above numbers were gathered from PerfHUD at 1027×768 resolution in my engine. So, if you need post processing anti-aliasing, use Jimenez’s MLAA. FXAA is poor in comparison to MLAA. The only downside to MLAA is that two extra render targets of RGBA8 need to be created, so at 1024×768, i am using a whole 3.14 MB per extra render target, at 1600×1200, its 7.68 MB per extra render target. For me, the speed increase is worth the VRAM usage.

Small Update

I have been working on the engine slowly over the past few weeks. I did incorporate MLAA into my engine –and it is fast too. I will post screen shots and some statistics to go with them. But, I can say that I am very happy with the results in both speed and quality. I haven’t been able to work on anything over the past week, and this will continue for at least another week. However, I will continue to make posts of my progress after I make it by this bump.

Updated Math Library

I am uploading a newer version of my math library. Again, this is free for any use to anyone. This library is something that I have been putting together for a while now. When I started this project, I went around the web looking for a decent template or math library that I could use; however, I was not able to find one that contained what I needed: readability; speed, and the most important –free! Most of the library is what I would consider pretty standard, but there are a few small differences, like a few different versions of a fast sqrt (which is very important), a trig look-up table that is about 6 times faster than using the standard function calls in the math.h file. Just remember, if you wish to use the trig function calls, make sure to initialize the tables with the InitMathLib() in the MathLib.h file, other than that, its ready to go.

This library is not guaranteed to be 100% accurate as I am still working on it and adding new functions. Many of the functions are written using the __m128 variable and intrinsic function calls, which means this library is intended for a 64 bit build –and for speed. There are some functions that pass the __m128 variable on the stack and when in 32 bit builds, the compiler cannot guarantee a 16 byte alignment of those variables, so a compiler error will appear. There are ways to work around this by not passing references of these variables to functions, and instead pass by copying the variables; but I don’t see a need for 32 bit support when the future is all about 64 bit anyway. So there you have it! If you download the library and find any errors, please post a comment on the forums so I can correct it.

Aside from that, I am still integrating assimp into my engine. I have two parts to work on, my static models and my animated models. So far the static model importing is complete, and now I am working on the animated part. Then, the MLAA will be next. After that I will make a few more tweaks to my terrain editor and then work on integrating Raknet. In case anyone doesn’t know, Raknet is a network library that appears to have a lot of tools built in. I have not had time to play with it much yet, but my initial impression is good. Time will tell!