Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Overdraw setting in 2020.1b5 ?

Discussion in '2020.1 Beta' started by sama-van, Apr 14, 2020.

  1. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,733
    Unity 2020.1.0b5 / URP

    I am looking for that cool feature to visualize the entire scene as transparent to debug overdraw from particles and transparent assets...
    But it seems it's been removed from the Shaded tab from the Scene view?...
    Where did the setting go?

    Browsing the 2020.1b5 documentation, it's still there but... no idea why it doesn't show up into the editor...
    - https://docs.unity3d.com/2020.1/Documentation/Manual/ViewModes.html

    OverdrawsettingMissing.png

    UnityOverdraw.PNG
     
    Last edited: Apr 15, 2020
    ROBYER1 likes this.
  2. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,733
    Settings is back in 2020.2.0a7

    Overdraw.png
     
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Even cooler if SRP versions could colour objects by estimated shader cost...
     
    AcidArrow likes this.
  4. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,526
    +1 on the overdraw not being useful.

    I used to look at it for mobile games, but it actually misinformed me, since tiled rendering means no opaque overdraw so that view really doesn't mean anything at all.

    I don't know how feasible the shader cost thing would be (although, ARM did have some tools for its GPUs were they estimated cycles for shaders, so... maybe), but if Unity could do that, it would be amazing.
     
    hippocoder likes this.
  5. Grimreaper358

    Grimreaper358

    Joined:
    Apr 8, 2013
    Posts:
    789
    This is how the Overdraw view works for HDRP but no Shader Cost visualization yet. This would be nice to have
     
  6. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,733
    oh well that's useful to see the overdraw on particles in a scene...
    If that thing glows intense, then good spot to optimize for sure :)
     
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Can use to see if culling is working also... it has it's uses I guess if you're not used to eyeballing things.
     
  8. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,449
    It's a real bummer it's not available in 2020.1 beta
     
    sama-van likes this.
  9. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,144
    hijacking: are cutout shaders cheaper than fade or transparent ones?
     
  10. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,526
    Depends on the hardware :/
     
  11. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,572
  12. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,526
    Those are all kinda outdated. The docs are not maintained, the Apple document is about GLES and Apple uses Metal these days, and the talk is from 2012.

    There was another thread on here where a user found that certain newer devices these days are fine (or even faster) with alpha testing and clip() / discard(), so it really depends on the hardware.

    Although if you want to support a whole bunch of mobile devices, especially older ones, I would still avoid alpha testing.
     
    joshcamas and laurentlavigne like this.
  13. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,144
    I ran a test on a mobile console:
    10k particles coaxial with the camera = max occlusion
    clip made with amplify: >60fps dipping to 45
    clip standard unlit: 30 peaking at 55
    particle fade standard unlit: steady 30
    particle alpha blended: steady 28 fps

    a display showing shader cost would be very good indeed
     
  14. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,449
    What kinda mobile console was this? As mentioned before hardware differs and affects performance in different ways.
     
  15. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,526
    If the particles are many, and they are pretty big meaning each pixel has multiple overlapping particles on it, you're going to kill the fillrate, so even if alpha testing is "bad" on that specific hardware, you have provided a pretty terrible use-case for alpha blending, so of course alpha testing is going to win.

    In general, the idea is that if you have alpha testing present, for the specific tiles (and most mobile hardware does tiled rendering, or at least used to) where alpha tested shaders appear, optimisations like early z can't be performed, so it automatically makes your performance worse. <- although this may be less of a problem depending on hardware.

    That's less of a problem with alpha blending, but then you have to mindful of fillrate. <- although certain hardware have fillrate to spare.
     
  16. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,144
    I see, next, I'll run more realistic tests that are in-game. Since I only target tegra X1 it eliminates a lot of the unknown.
    extra scene to the bench test: mobile particle transparent = amplify clip