Gras Performance Question (masked Materials)

The tradeoff here could very based on your hardware. generally though, masked materials are only expensive when they ‘overdraw’. If you go into shader complexity viewmode, you should see this. If you have a masked material that has a 100% white solid mask, the performance will be fairly close to opaque although there is still some overhead.

But if you made your mask black, now the entire surface would be rendered but “invisible”. However making the pixel “invisible” in this case didn’t make it any cheaper to render. So if you stack 10 of these invisible planes one behind another, the total cost will be 10x as expensive, since for each pixel it will have to see that it was invisible 10 times. However if any one of those pixels is “opaque” inside the material, it can reject and stop checking the other masked shaders behind it (for that pixel only that frame).

So the performance cost of masked is directly proportional to the ratio of “masked” area in the alpha mask compared to the unmasked area.

Personally I would suggest the individual hair method for up close with an LOD that uses the cluster method. Best of both worlds since as something gets further away, the pixel/vertex tradeoff switches (ie, there isn’t as many pixels on a faraway mesh of the same scale, but there are the same amount of verts!)