Unity Community

Register or Sign In:

+ Reply to Thread
Page 1 of 3 1 2 3 LastLast
Results 1 to 20 of 52

  1. Location
    PT
    Posts
    207

    FXAA - Fast Approximate Anti-Aliasing

    Lately, we've been working on a tech demo to showcase our virtual texturing extension. After deciding to go for deferred rendering, we started looking for a good post-process anti-aliasing approximation technique.

    Not long after testing a few AA solutions, including NFAA and Unity's luminance edge blur, we ended up porting FXAA over to Unity. While it isn't without it's problems, it gave us very acceptable results:



    We figured that some of you might also have a use for this AA technique so we decided to share it.

    Feel free to to download it using one of the following mirrors:
    http://insidious.pt/downloads/FXAA3.unitypackage
    http://dl.dropbox.com/u/14079608/FXAA3.unitypackage

    To make it work, simply:
    1) Install the package
    2) Select your camera object
    3) Add the component "Image Effects/FXAA3"

    No need to tweak any parameters, just plug and play.

    I was called into attention that a FXAA Unity port has already been done by gaustwick a week ago. He's been comparing several techniques with FXAA and posted the results. Feel free to check out his thread.
    Last edited by Diogo Teixeira; 07-28-2011 at 04:13 PM.


  2. Posts
    1,107
    Thanks Diego. I am still not decided if use forward, or deffered mode or combine both. Which problems have you find with this technique?
    Last edited by Demostenes; 07-17-2011 at 09:57 AM.


  3. Location
    Portugal
    Posts
    231
    thank you very much for this!

    looking awesome


  4. Location
    PT
    Posts
    207
    This image shows two major problems with this technique: long poly edges + loss of contrast in non-edge areas



    However, I'm sure these are universal issues in post-processing AA techniques. Overall the results are still very acceptable.

    The second issue might be fixable with a contrast enhancement filter.
    Last edited by Diogo Teixeira; 07-17-2011 at 10:16 AM.


  5. Posts
    133
    Thanks for sharing this is awesome!


  6. Posts
    1,107
    Quote Originally Posted by Diogo Teixeira View Post

    The second issue might be fixable with a contrast enhancement filter.
    Thanks, this really helped.

    I have some problem with deffered lightning in general, some shadows are blinking like disco when camera is moving. It can be solved by drastic increase of bias, but then majority of shadows is not connected to object. But this is probably Unity BUG, I am curious about promised shadows improvements in 3.4.
    Last edited by Demostenes; 07-17-2011 at 11:45 AM.


  7. Location
    PT
    Posts
    207
    Cheers, everyone.

    Quote Originally Posted by Demostenes
    I have some problem with deffered lightning in general, some shadows are blinking like disco when camera is moving. It can be solved by drastic increase of bias, but then majority of shadows is not connected to object.
    What type of light generates those problems you're having? Cascades help on directional lights. Using a short range might also help precision; this should be valid for all types.


  8. Location
    Singapore
    Posts
    1,348
    Wow. This looks great. From the images, there's really a lot of difference.
    I don't break rules. I bend them.


  9. Location
    CA.
    Posts
    782
    This is impressive, with no tweaking required, I believe it looks better than the luminance edge blur, fantastic!


  10. Location
    Tokyo
    Posts
    329


  11. Location
    Belton, Texas
    Posts
    653
    Perhaps a stupid question, but bears asking - is this compatible with Unity Indie?
    Current Projects: Not Another Fantasy RPG
    Completed Projects: S.H.M.U.P., Zombies vs. Knights


  12. Location
    Sweden
    Posts
    153
    Great stuff. Thx for passing it along.

  13. Volunteer Moderator
    Posts
    17,426
    Quote Originally Posted by Asvarduil View Post
    Perhaps a stupid question, but bears asking - is this compatible with Unity Indie?
    Since Indie can't use deferred rendering, it's a moot point.

    --Eric


  14. Location
    UK
    Posts
    158
    Diogo - did you see my thread in the shaderlab forum about the latest FXAA?

    I did a comparison of the deferred renderer quality with each version.


  15. Location
    PT
    Posts
    207
    Quote Originally Posted by gaustwick
    Diogo - did you see my thread in the shaderlab forum about the latest FXAA?
    I completely missed it, to be honest. I usually just visit the Showcase forum.

    This one was based on 3_9. It's interesting to see how much it evolved.


  16. Posts
    760
    Very nice! Thanks for sharing with us!


  17. Location
    Amsterdam
    Posts
    338
    does it work on iOS?
    -design & develop through play-

  18. Volunteer Moderator
    Posts
    17,426
    Quote Originally Posted by SimonAlkemade View Post
    does it work on iOS?
    Again, there is no deferred rendering on iOS, so it's a moot point. Just use MSAA if you want anti-aliasing, you don't need a shader that emulates it.

    --Eric


  19. Location
    PT
    Posts
    207
    Quote Originally Posted by SimonAlkemade
    does it work on iOS?
    This new version might work (was excluding the gles target):
    http://dl.dropbox.com/u/14079608/FXAA3.unitypackage

    I don't have access to iOS hw so I can't confirm this. Let me know if that works for you, and how fast.


  20. Location
    CA.
    Posts
    782
    MSAA and this FXAA combined creates some serious soft edges, they both work together so even if your not using deferred rendering, you can use this shader along with the built in AA in unity, it makes extremely soft edges.