Jump to content

SMAA


Timmy

Recommended Posts

Hi Guys,


Here is an implementation of SMAA from here: http://www.iryoku.com/smaa/


Source Code: https://github.com/rextimmy/Torque3D/tree/SMAA


If someone wants to take this further and produce an official pull request, please go ahead but do note........


There are a few problems:


1) There is a problem with OpenGL. It works perfectly on Direct3D 9 and even our own experimental Direct3D 11. With OpenGL something goes wrong in the second pass(blend weights). I'm not sure if it doesn't like the texture format or it's something else? i'm just not sure. We don't use OpenGL so i didn't bother tracking it down any further.


2) This really needs to be implemented with some sort of options menu that handles the different quality levels or even the different AA options (i.e FXAA). In DM we have done this but that code won't be compatible with T3D, so i have trimmed this implementation down to suit. I tried to comment where i could in the source files about this.


Any questions just ask and i'll try and point you in the right direction.


Results


Sorry i only had time to do one round of screenshots here. Biggest difference you will notice between SMAA/FXAA is the vegetation in these screenshots.


No AA:

http://i.imgur.com/HPZctVL.png


FXAA:


http://i.imgur.com/9nVDmAJ.png


SMAA:


http://i.imgur.com/AdBIWi2.png


Performance:


SMAA is definitely more expensive than FXAA. What i have found though (from testing on a few different GPU/CPU combos), the difference can be negligible if you have a recent rig. T3D is so CPU bound for any mid->high GPU/CPU combo, that the GPU spends more time idling than it does actually working I.E this extra work SMAA makes it do, makes no difference to frame rate for those set-ups.

Edited by Timmy
Link to comment
Share on other sites

I've seen a few implementations in Unity that claim to have it working in OpenGL, but I haven't seen anyone actually get the original posted smaa.hlsl file on github to work with OpenGL. Even after he modified it add GLSL support, I'm not entirely convinced it works.


I hit the exact same issue you did implementing it in Torque 6. I've also found 3 or 4 forum posts around the internet where people hit the same wall myself and you have hit; the blend weight pass just doesn't come out right in GLSL and the final pass falls apart because of it.

Link to comment
Share on other sites

Is there any AA technique that's close-ish to SMAA that definitely works on OpenGL?

 

I'm quite happy with DLAA. It's simple enough to implement, produces good quality and it's quite fast. That said, I never actually got SMAA working so my opinion is a little biased. Also never had the ability to do a side by side comparison for quality differences either so take the suggestion with a grain of salt :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...