- Home /
Are the polygons that fall within the alpha range of the Cutout Standard Shader rendered?
For example, I take a cube, make one of its faces transparent, and assign the Cutout Standard Shader to it. Is that face still being rendered?
If so, how expensive is the performance compared to the cube's all other faces?
Answer by Bunny83 · Jul 31, 2015 at 12:12 AM
Yes it is still rendered and has almost the same overhead. You might save a bit fillrate since the cutout shader won't write to the frame buffer when a fragment is discarded. However every fragment(pixel) is still processed.
Scene complexity can be increased by overdrawing, which happens when "an object is drawn to the frame buffer, and then another object (such as a wall) is drawn on top of it, covering it up. The time spent drawing the first object was wasted because it isn't visible."
Then I am correct to assume that the alpha portion of the material with the cutout shader applied will not be drawn on top of another object (since there's nothing to draw) ?
Not really. It depends on what you ment by "drawn". The fragment shader has to be executed for each pixel in order to deter$$anonymous$$e if a fragment can be discarded or not. As i said, the only thing that might be saved is fillrate as those fragments don't write to the framebuffer. The triangle however is still rendered and rasterized. The shader can't know if a part of a triangle will be visible or not until it actually rendered each fragment.
Depending on your hardware the discard / clip instruction might even have a negative impact on performance as it messes up the pipeline and prediction.
Your answer
Follow this Question
Related Questions
Does emission on standard shader reduce performance? 0 Answers
How to manage shader with script 1 Answer
Making a cutout semi-transparent? 1 Answer
Transparency issue on iOS 1 Answer