Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

MSAA / HDR / forward rendering

Discussion in 'Scripting' started by komatii, Apr 8, 2013.

  1. komatii

    komatii

    Joined:
    Sep 8, 2010
    Posts:
    58
    Why exactly does Unity disable MSAA for forward rendering and HDR?
    This seems entirely backwards, given that MSAA is normally a problem for deferred rendering because the antialiased edges cause normals to blend and give incorrect results for lighting.

    Technically there's no reason MSAA can't be used for a floating point target, and Unity is the only case I've seen of disallowing MSAA for a floating point target.

    komatii
     
  2. cakeslice

    cakeslice

    Joined:
    Oct 18, 2014
    Posts:
    197
    Bump since after all this time it's still not available. If it's a cross platform problem, at least enable it for DX11 only or something.
     
    Steve-Tack and Teku-Studios like this.
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,002
    From http://aras-p.info/projHDR.html

     
  4. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Indeed. I've had to avoid HDR in my project, since post processed anti-aliasing causes too many issues for me.

    I have two issues with post AA that don't occur with MSAA. The first is blurring of my detailed skyboxes. The second is that I have a 3D world -> transparent overlays -> 3d world -> transparent overlays setup, so it's basically impossible not to have the UI overlays that are in between 3D cameras not get terribly blurred. Looks terrible.

    The thing is, I could really benefit from HDR. :(
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Everyone benefits from HDR. The solution for me is merely to wait until Unity comes up with a great post fx AA.
     
  6. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Wait, has this been addressed in Unity 5 already? My current project is in 4.6 (planning on waiting for a 5.1 version before converting).

    I pulled up a test project in Unity 5.0.1f1 that uses an HDR camera (DX11, deferred, linear), and it DID let me select 4x Multi Sampling in the Edit -> Project Settings -> Quality inspector and anti-aliasing is being applied. Am I dreaming or was that feature quietly added recently?
     
  7. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yeah unity's making new awesomesauce AA. As for AA in deferred, that quality setting probably doesn't work (I wouldn't expect it to).
     
  8. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    You're right. I was dreaming. Even selecting 8x in deferred has no effect. Turned out the test scene just didn't look that bad with zero AA.

    I guess I'll have to wait for the Awesome Sauce AA as well. :) In the mean time, maybe I'll go ahead with HDR and just leave AA off...
     
  9. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    305
  10. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Super sampling SSAA is never going to be a realistic option for anything other than presentations in my view.
     
    Aieth likes this.
  11. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    107
    Has anyone had success getting Super Sampling SSAA to work with a two or three camera setup such as UniStorm or UFPS, or even better them working together? Once I add SSAA to one or both camera I get the hall of mirror effect.

    I'm hoping the huge performance hit was a result of the issues I'm having, otherwise this is good for screenshots and that's it.

    Any help would be greatly appreciated.
     
  12. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    305
    Do you have the latest update of SSAA? There was a fix for multi camera problems a couple of weeks ago and we haven't heard any complaints since then.
     
  13. kloogens

    kloogens

    Joined:
    Jul 1, 2015
    Posts:
    107
    Hmm, interesting... I updated just today. And I just reinstalled to make sure I didn't install the wrong version or something.

    I've tried a couple different configurations with no success.

    I'll try an empty project and slowly piece things together and see if I can isolate the problem better.


    The visual results are less than appealing.
     
    Last edited: Jul 23, 2015
  14. Flow-Fire-Games

    Flow-Fire-Games

    Joined:
    Jun 11, 2015
    Posts:
    305
    If you have issues with SSAA, please write us a mail at flowfire@inbox.com, this is the wrong place for support for our asset. We also just tested it with the latest UFPS version and it worked fine on our machine. Please send us some screenshots / details and we'll try to help.
     
  15. FranckS

    FranckS

    Joined:
    Jan 14, 2014
    Posts:
    29
    The article was written more than 10 years ago. Can we get MSAA with HDR now please Unity. I worked on three shipped games already that had that feature, of course that was prior to switching to Unity engine, really annoying stuff.

    While I'm at it, being able to choose alternate backbuffer formats (i.e. semi-HDR 10.10.10.2) would be even nicer.
     
    Cynicat and Steve-Tack like this.
  16. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    290
    this would be so nice for VR, come on unity!
     
    Steve-Tack likes this.
  17. jashan

    jashan

    Joined:
    Mar 9, 2007
    Posts:
    3,306
    Yes indeed. Not having this is really annoying, especially for VR development.
     
    Steve-Tack likes this.
  18. Rapickt

    Rapickt

    Joined:
    Sep 12, 2012
    Posts:
    4
    Working on VR too, can only agree and bump for visibility
     
    Steve-Tack likes this.
  19. Panther217

    Panther217

    Joined:
    May 4, 2014
    Posts:
    5
    1) Download Unity free posteffects https://assetstore.unity.com/packages/essentials/post-processing-stack-83912
    2) Add "PostProcessingBehaviour.cs" on main Camera.
    3) You should turn on "HDR" on main camera for correct posteffects.
    4) If you have forward rendering path (by default in Unity), you need disable AA "edit->project settings->quality->antialiasing" or turn of "MSAA" on main camera, because HDR does not work with MSAA. If you want to use HDR and MSAA then use "post effect msaa".

    For examples of this see this "Mesh Effects" asset: https://assetstore.unity.com/packages/vfx/particles/spells/mesh-effects-67803
     
  20. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,238
    HDR and MSAA can be enabled at the same time since 5.6, about 4 months after the this thread originally ended.

    However it is true that HDR and MSAA still do not play nicely and very bright objects can cause still cause aliasing to appear, and the features necessary to solve this issue properly hadn't been added to Unity until just recently.

    Also, MSAA is a very specific kind of anti-aliasing, there is no such thing as a "post effect msaa". The post processing stack has options for FXAA, SMAA and Temporal AA. Temporal AA is likely the one you want to use as FXAA and SMAA aren't terribly effective for VR.
     
    Last edited: Jul 20, 2018
    blueivy likes this.