- Home /
How does rendering mode affect the number of tris and vertices drawn?
I am doing some research into understanding how Unity renders objects so that I can better optimize performance for VR projects. I am having trouble, however, understanding how the rendering statistics window is calculating the number of tris, verts, and draw calls.
As a control, I have a primitive 3D cube in the default scene with a single directional light and a fully black skybox (camera clear flags set to Solid Color). The 3D cube has a mesh renderer with a material using default settings. With the albedo color set to full white (255, 255, 255) and an alpha of 125, I've switched between all the rendering modes and made a note of some values:
With directional light ACTIVE:
Opaque, Cutoff:
SetPass: 6
Tris: 52
Verts: 104
Fade, Transparent:
SetPass: 6
Tris: 14
Verts: 28
With directional light INACTIVE:
Opaque, Cutoff, Fade, Transparent:
SetPass: 6
Tris: 14
Verts: 28
From my understanding, the directional light is causing extra draw calls on an opaque material due to calculating the light hitting the cube. However, the Transparent rendering mode doesn't seem to be taking light into account and thus does not do any extra draws as a result of the light. This is contrary to specular highlights and reflections supposedly appearing with Transparent (as opposed to Fade, described in the Unity manual).
Additionally, I would have guessed that the Transparent rendering mode would induce more draw calls due to the camera having to render background objects. Yet, running the same experiment with another cube in the background, using the exact same material, produced relative results
Why doesn't occlusion culling reduce the number of tris and verts drawn on opaque objects? Why aren't the number of tris and verts drawn with transparent objects increased?
From this simple experiment, it seems that opaque objects with light are creating more draw calls, whereas transparent objects require the least number of draw calls. This might lead one to conclude that transparent materials require less performance, which I know is untrue. What am I missing here?
Why doesn't occlusion culling reduce the number of tris and verts drawn on opaque objects?
You actually have to setup and configure occlusion culling for it to have any effect (Window -> Occlusion Culling), simply checking occlusion culling on the camera is not enough. Only objects marked as "Occluder Static" will be able to actually occlude, and you must "bake" the scene beforehand.
Your answer
![](https://koobas.hobune.stream/wayback/20220612132306im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
unwanted pale shadow like,at the edje of gameobject in high speed 0 Answers
Rendering with the CPU in Unity 0 Answers
GrabPass and Transparent geometry 0 Answers
Why am I getting shadow strange artifacts? 1 Answer
Rendering problem? 0 Answers