Hey gang,
Just looking for opinions here. I recently bought a package of models I intend to use in my project. In this package, the author created three levels of LODs. The interesting thing about these LODs is, in addition to simplifying the geometry, he also uses less expensive shaders for each subsequent LOD level (he uses a diffuse/bumped/specular for LOD0, diffuse/bumped for LOD1, and diffuse for LOD2).
I would not have thought to do that, but it seems like a pretty good idea on the surface. My only reservation is since those LODs are now using different materials, it will bounce up the number of draw calls used, since they can no longer be batched together.
So what do you guys think of that practice? Useful methodology? Or does the increase in draw calls eliminate the benefits of using the simpler shaders?
Well, if anyone is interested, the answer to this question appears to be: It makes absolutely no difference, performance wise.
I applied three different materials to my LODs (a DNS on my LOD0, a DN on my LOD1, and a D on my LOD2 and 3). They all use the same diffuse texture. I applied this to a prefab in which I have several dozen in my game and put my character in a spot where they could see a bunch of them at various LOD levels (the model itself is a section of corridor, so I just put the character at the start of a long corridor).
At that particular spot, I was getting ~52 FPS in the editor prior to changing the materials (all LODs using a DNS shader). I changed shaders as above, applied to all prefabs and reran. I got exactly the same value. Which tells me that my limiting factor is not the shaders. Somewhat oddly to me, the number of draw calls and batched calls didn’t really change either (I figured it would change somewhat due to different materials be used, but no, not really).
I suppose if you have a really expensive custom shader of some sort, there might be some value in changing down to a less expensive shader for LODs down the chain, but for a simple DNS shader, there doesn’t appear to be any reason to do so.