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…
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.
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.
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
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.
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