Hello.
As of my understanding, transparent materials/shaders require more power than a standard opaque one. That considered, take an object such as a weapon scope for example where a large portion of it is opaque, though there are transparent lenses.
What would be the performance difference between giving the entire scope a transparent material, and setting the plastic/metal areas to be opaque in the opacity and the lenses to be transparent
vs
Giving it two materials, an opaque for the plastic/metals and a transparent material for the lenses.
I guess the underlying question is, does opaque geometry cost more to render with a transparent material or is it treated the same as a standard opaque material?
Since the lenses aren't part of the same element as the rest of the scope, if I'm not wrong giving it another material ID wouldn't increase the vert count, but neither should there be overdraw since the opaque parts are fully opaque in the transparent material. Correct me if I'm wrong.
Replies
Modern day hardware can draw about to 11million tris in a real time high quality game.
I'm more interested in what's the performance like when the pixel it's rendering hits a transparent material, but that pixel is completely opaque. The shader complexity view shows it as red, but I can't imagine it costing that much to just check whether it's transparent or not, but maybe it's really sensitive. It's also rendering faces behind itself, I'm not sure if this is intended or if I'm doing something wrong. It's a pretty complex mesh I'm using.
There is also some sorting errors going on, thats why you see pieces through it. The opaque material would solve this too.
Clearly there are issues with using a transparent material for the full thing, neither was I intending to use a single material, it was a question of curiosity.
If you don't split it, the opaque bits of the material are still alpha blended so you're paying for transparency on pixels that don't need it.
The calculations still need to be done regardless of opacity (I assume this is blended rather than clipped)
One extra primitive is bugger all in the grand scheme of things - and it'll sort properly..