Search Unity

Anti aliasing not working in unity3d 2017.1.0f1

Discussion in 'Web' started by blacKode, Jun 30, 2017.

  1. blacKode

    blacKode

    Joined:
    May 21, 2015
    Posts:
    38
    Anti aliasing not working in unity3d 2017.1.0f1, Chrome, Firefox and Edge ...

    Building the same project ... with unity3D 5.6.1f1 work fine ...

    but with unity3d 2017.1.0f1 anti aliasing fail

    * Rendering path Forward ...

    Regards ...
     
  2. blacKode

    blacKode

    Joined:
    May 21, 2015
    Posts:
    38
    Hi again ...

    Importing the project directly (unity conversion) anti aliasing does not work ...

    ... but i try creating new project empty, copying files & manually resetting options ... & now work fine, ok
     
  3. blacKode

    blacKode

    Joined:
    May 21, 2015
    Posts:
    38
    Hi again ...


    After many tests ...

    ... forcing graphics to api webgl 1.0, anti aliasing work fine in versions 5.5.4p1 or lower ... but no work in 5.6.2p1 or 2017.1.0f1

    Concreting: I like use webgl 1.0 because it improves performance of certain things but in versions highers at 5.5 no work anti aliasing ... Chrome, Firefox and Edge ...

    ¿Any solution? Thanks, regards ...

    * forcing to api webgl 2.0 work fine always, only fail forcing to webgl 1.0
     
  4. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Assuming your project has Image Effects, this is expected.

    From the manual:
    "be aware that any post-processed effect applied to the camera disables the built-in Anti-Aliasing on WebGL1.0. There is no such limitation on WebGL2.0."
     
    blacKode likes this.
  5. blacKode

    blacKode

    Joined:
    May 21, 2015
    Posts:
    38
    Hi Marco !

    Thank you, i did not know that ... but no, it is not the case, no use Image Effects ...

    ... it's more, it works fine in versions 5.5.4p1 or lower ...

    Regards ...
     
  6. blacKode

    blacKode

    Joined:
    May 21, 2015
    Posts:
    38
    Check with unity 5.6 or highter ... new project, create only 1 sphere, activate anti aliasing in options and force api to webgl1.0 ... you can see that anti aliasing work in editor but stops working in browsers
     
  7. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    167
    @Marco-Trivellato
    I post a bug (Case 951565).
    WebGL AA is disabled after button click.
    no image effects.
    but also I think it's webGL 2.0
    on unity 5.5 same button click does not disable AA, it's related to updates in 5.6

    also may be it's related to browser bugs and api, in old chrome AA is work on 5.6 on my machine, but not on other people's

    p.s.
    which exactly conditional "if" disables AA on web? it's in unity code or in browser? may be it's false positive due to renderTexture or custom shader?
     
    Last edited: Sep 17, 2017
  8. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    We added a fix for this in 2017.1.1p1 and 5.6.3p2 patch releases .

    Try updating to that and see if that fixes it for you.
     
    Last edited: Sep 18, 2017
    blacKode likes this.
  9. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    To clarify what to expect in terms of AA support on WebGL, the manual will be updated to include the following:
    WebGL supports anti-aliasing on most (but not on all) combinations of browsers and GPUs. To use it, anti-aliasing must be enabled in the default Quality Setting for the WebGL platform.

    Note that on WebGL1.0 there are several limitations:
    • Switching quality settings at runtime will not enable or disable anti-aliasing - it has to be set up in the default Quality Setting loaded at player start up.
    • The different multi sampling levels (2x, 4x, etc..) have no effect in WebGL, it’s either on or off.
    • Any post-processing effect applied to the camera disables the built-in Anti-Aliasing.
    • HDR is not compatible with anti-aliasing so make sure “Allow HDR” camera option is disabled.
    There are no such limitations on WebGL2.0.
     
    Last edited: Sep 28, 2017
  10. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    167
    I post a bug 951565 with Version 5.6.3p2_b3d7a6428558, it's not fixed in my case
     
  11. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    could you be so nice and attach the test project from the video? thanks
     
  12. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    167
    hello! I can't attach the project from video - it's huge closed codebase, not test project,
    but I have tested some cases, and created new bug report (Case 953509)
    with simple scene in unity 5.6.2f1 and 5.6.3p3 - AA is totally not work for me, but work in 5.5..
    in old (full) project AA is work prior to button click and disables after click.. all my simple tries for cut the full project for pieces not reproduces "AA work prior to click" and lead to totally AA disablied - finally I have attached only simple project, but in all sequent tries AA is not work at all in 5.6

    p.s. I must mention - AA not work in firefox 55.0.3 (32 bit) (local build, and build downloaded from my server) but work in chrome (from server) (screen from chrome http://prntscr.com/gotzyg)
    more precisely: AA is not work in unity 5.6.2f1 and 5.6.3p3 when build tested in firefox 55.0.3 (latest), but AA work in firefox when build is builded in unity 5.5;
    AA is work in chrome 60.0.3112.113 (64 bit) builded on both 5.5 and 5.6
    also it's tested not only on my machine, but in my collegue too.
     
    Last edited: Sep 23, 2017
  13. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    could you check the browser console log to see whether you are its using webgl1.0 or webgl2.0?
     
  14. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    167
    I have found a reason - it's HDR:
    0) people from support help me with test project, where WebGL 1.0 in firefox (latest) disables MSAA when HDR on main camera is turned on.

    but other reasons match too:
    1) after convertion 5.5 to 5.6 project - all scene cameras turns on his HDR.
    2) on dynamic created cameras (I use SVG Importer plugin, and it uses this feature, but it's not image effect) new camera makes HDR enabled.

    webgl 2.0 not have this issue. but why 2.0 is disables by default in latest browsers?

    unity 5.5. is ok with it due to disabled HDR.

    also I have read "Graphics: Added HDR MSAA anti-aliasing support. HDR rendering and MSAA anti-aliasing now works as expected with forward shading." in unity 5.6 news, it not true for webGL 1.0
     
  15. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    167
  16. blacKode

    blacKode

    Joined:
    May 21, 2015
    Posts:
    38
    Thanks, in my case it works.
     
    Last edited: Nov 6, 2017