Search Unity

  1. Engage, network and learn at Unite Austin 2017, Oct 3 - 5. Get your ticket today!
    Dismiss Notice
  2. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  3. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  4. Unity 2017.1 is now released.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice
  6. Unity 2017.2 beta is now available for download.
    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:
    873
    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,177
    Is this the built-in AA or an ImageEffects-based technique ?
     
  3. topofsteel

    topofsteel

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

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,177
    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,177
    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:
    873
    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:
    873
    @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,177
    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:
    873
    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:
    34
    Attached scene uses Unity's SMAA from Cinematic Effects package. Worth a try, IMHO:

    Web interior walk AA.png