1. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  2. We're looking for feedback on Unity Starter Kits! Let us know what you’d like.
    Dismiss Notice
  3. We’re giving 2017.1 beta testers a chance to win t-shirts and a Nintendo Switch. Read more on the blog.
    Dismiss Notice
  4. We want to know how you learned Unity! Help us by taking this quick survey and have a chance at a $25 gift card
    Dismiss Notice
  5. Unity 5.6 is now released.
    Dismiss Notice
  6. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice

Image effects - fog and anti-aliasing

Discussion in 'WebGL' started by topofsteel, Feb 4, 2016.

  1. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    859
    I just discovered adding global fog to my camera disables anti-aliasing. I'm not sure if this is a WebGL specific problem or not. But is there a solution for that? And is there a guide or reference about which effects conflict with others and what order they should be in? Thanks.
     
  2. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,046
    Is this the built-in AA or an ImageEffects-based technique ?
     
  3. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    859
  4. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,046
    I haven't looked at how fog is implemented but maybe it's just a matter that the fog is bi-linear filtering the source image, thus blurring the final image. That would explain why AA does not seem to work anymore.

    Have you tried with a post effect-based AA technique so that you can perform AA, then Fog ?
     
  5. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,046
    A bit of experiments confirmed what you are experiencing. Even with a simpler Image Effect, AA will not work anymore.

    We'll investigate and follow up here on this thread.
     
    kenshin likes this.
  6. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    859
    Is there an update on this? I am using Forward rendering because of the AA, but not being able to use any image effects is tough!
     
    kenshin likes this.
  7. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    859
    @Marco Trivellato

    Can you comment on this, or provide any feedback about the problem? Thanks.
     
  8. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,046
    sorry for the delay, last time I looked at this problem the browsers were missing a webgl2.0-specific extension that we require to get this to work.

    I believe this is not the case anymore so I am going to take a look again so that we can fix it. However, that will fix it in webgl2.0 only and, likely, only in Firefox and Chrome (I need to check the other browers). So for the time being I would recommend to opt for a post-processing based AA technique instead of the built-in one.
     
  9. topofsteel

    topofsteel

    Joined:
    Dec 2, 2011
    Posts:
    859
    No problem, thank you for your reply. Yeah, that's what I've been experimenting with. I haven't needed to deliver a WebGL build yet, but I do port all of my geometry over to see what I can do/how good I can get it to look. Typically I work on standalone builds that I plan to run from my PC, so I can use super sampling and one of the post processing solutions without a problem. But that's really not a solution for WebGL I don't think.
    Can you recommend an AA solution that works well with WebGL and Deferred? Thanks.
     
  10. minev

    minev

    Joined:
    Nov 19, 2014
    Posts:
    33
    Attached scene uses Unity's SMAA from Cinematic Effects package. Worth a try, IMHO:

    Web interior walk AA.png