Search Unity

(Solved)where is the anti-aliasing post processing effect on URP?

Discussion in 'Universal Render Pipeline' started by Aokkii, Nov 4, 2019.

  1. Aokkii

    Aokkii

    Joined:
    Nov 3, 2013
    Posts:
    118
    I don't see a antialiasing post-processing effect in the effect list.
    or there one for that?

    then I should use unity built-in anti-aliasing?.
     
    Ali_V_Quest likes this.
  2. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    The post processing AA is now part of the camera rather than the volume stack.

    Screenshot 2019-11-04 at 13.04.01.png
     
  3. Aokkii

    Aokkii

    Joined:
    Nov 3, 2013
    Posts:
    118
    Thanks
     
  4. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Sorry to dig this up but just wondering, what does this AA parameter do if there's a per camera one?
    Screen Shot 2020-07-17 at 5.32.56 pm.png
    Thanks!
    Pete
     
  5. HDBGraphics

    HDBGraphics

    Unity Technologies

    Joined:
    Aug 20, 2019
    Posts:
    3
    Hope you found the information you were looking for. But in case you didn't then I can try to help:

    The setting you have pictured is for multi-sampling anti-aliasing (MSAA) only. The value will be used by any camera that has MSAA Use Pipeline Settings. So you can control MSAA off/2x/4x/8x per-pipeline asset, and then override MSAA on/off per-camera.

    upload_2020-9-14_18-5-57.png

    The other anti-aliasing dropdown (shown below) is used for post-processing anti-aliasing (FXAA or SMAA) and is only used if "Post Processing" is checked on the camera (or checked on an overlay camera if you're using camera stacking)


    upload_2020-9-14_18-13-48.png
     
  6. petey

    petey

    Joined:
    May 20, 2009
    Posts:
    1,824
    Hey thanks for that! :)
     
    HDBGraphics likes this.
  7. eldorno

    eldorno

    Joined:
    Sep 1, 2016
    Posts:
    4
    @Andre_Mcgrail / @HDBGraphics Thanks for the info, I've got a few related questions and would really appreciate if you're able to clarify some things for me!

    Firstly, do these two methods work together, or are you supposed to pick just one? I've been trying different combinations of the two in a test scene and it seems like they do both work together, perhaps even affecting different bits of aliasing each (the camera AA modes seem to smooth out diagonal lines more, while the pipeline MSAA mainly just affects vertical lines?), but it's hard to tell. I'm wondering if it's worth using both, or if that has a high performance impact or other issues - I'm not planning on targeting mobile, but intend to target Switch and cater to lower end PCs. Leading on from that, if I needed to pick one (or, say, wanted a quality slider in my settings menu), what would be the recommendation? Does one give more bang for your buck, so to speak?

    Thanks in advance for any info you can provide :)
     
    joel_unity689 and petey like this.
  8. Andre_Mcgrail

    Andre_Mcgrail

    Unity Technologies

    Joined:
    Dec 9, 2016
    Posts:
    244
    Hey,
    The two modes do work together and many modern videogames, especially PC, have them both as options to enable at the same time.

    I wont go into huge detail as there is plenty of resources of how each works and the pros and cons of each on the internet, but genreally MSAA can be cheap on some hardware(some mobile GPUs can give up to 4x for free pretty much), it will only solve geometry aliasing(so where tirangles start/end) and requires more gpu memory. Post AA, being FXAA or SMAA work on every pixel after it is rendered by 'guessing' how much the pixel should share colour with a neighbour, so this helps all over the screen generally, meaning things like specular aliasing(when small specular highlights from light sources are flickering) and alpha aliasing(vegetaion materials with alpha clip textures) can be fixed.

    Which one to use comes down to the look of what you are making I think, if it is a modern PBR stype with detailed textures and ligthing, then use FXAA or SMAA(and eventually TAA when URP add support) but if you have more simple textures and lots of geomery to add details then MSAA will work better.
    When it comes down to it, just test, try either and both, profile and if you have the performance to spare there is nothing wrong with using MSAA plus a post based AA solution.
     
  9. HeatherK

    HeatherK

    Joined:
    Nov 13, 2019
    Posts:
    12
    Hello, I'm having issues with my objects having jagged edges in webgl. I've tried uping the antialiasing in project settings and it makes no difference at all. Will this fix it? if so where do I find this in my camera, I don't see it in the inspector.
     
  10. sushil9394l

    sushil9394l

    Joined:
    Aug 2, 2020
    Posts:
    6
    Hey Can Someone Tell Me How to Change The Anti Aliasing Mode To FXAA or SMAA On Camera On Runtime, Im Using URP Bytheway
     
    lacas8282 likes this.
  11. eldorno

    eldorno

    Joined:
    Sep 1, 2016
    Posts:
    4
    Sorry for the (extremely) late reply! Thank you, that's some really useful information! I think that answered all my questions, including any follow-ups I had, thanks ^^
     
  12. fuzzy3d

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    228
    I don't see SMAA or FXAA effect in headset- URP, Windows Mixed Reality, HP Reverb G2. How can I increase antialiasing?
     
  13. immeasurability

    immeasurability

    Joined:
    Apr 22, 2014
    Posts:
    125
    Unity3D Not supported antialiasing in URP and Quest 2 at any version, may be need 5-10 yeas for complete this problem. I think it might be related to the HP Reverb G2 too.
     
  14. Long2904

    Long2904

    Joined:
    May 13, 2019
    Posts:
    81
    When does Unity apply the anti-aliasing effect (FXAA/SMAA)? Is it before the post-processing stage or later? I'm experiencing flickering bloom and have tried every combination of anti-aliasing but nothing worked. I heard it happened because Unity applies the anti-aliasing before the bloom effect, so I only want to confirm it.
     
  15. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    727
    Because of how quest 2 hardware works, you do not want post process anti aliasing. You'll destroy your performance for such little gain. MSAA x2 is almost free on quest 2, x4 is a small performance overhead, so you should use one of those.
     
    Last edited: Sep 30, 2022
    Meceka, pierre92nicot and MattDavis like this.
  16. immeasurability

    immeasurability

    Joined:
    Apr 22, 2014
    Posts:
    125
    Iam not understan, how u get this info? u test this or u read this somewhere? how u can answer this, if u not see the result of u MSAA x4 and VR headset Quest2?

    Ok iam creating just now new empty project URP on 2021.3.7f1, add simple object and VR support switch to MSAA x4. And what? Yes this NOT work! u just best! I hope you get hired by Unity! thx u!
     
  17. funkyCoty

    funkyCoty

    Joined:
    May 22, 2018
    Posts:
    727
    Oculus has some documentation, but I've also spent time reading various Snapdragon documentation.
     
  18. lacas8282

    lacas8282

    Joined:
    Apr 25, 2015
    Posts:
    139
    How to change AA from code under URP?
     
  19. restush96

    restush96

    Joined:
    May 28, 2019
    Posts:
    145
    If you have set antialiasing on URP asset, you don't need to change camera antialiasing, even you can disable AA on camera, let URP asset control it.