Greetings everyone,
i have been tinkering the past week in a scene trying to make my own decent torch prefab, with not too much of a performance drawback.
Now when i started looking closely at my statistics, i notice my draw calls in a quite simple scene are well… through the roof, to put it bluntly.
First i’ll include two screenshots

Screenshot of the main part of the scene and statistics

closeup of the main object (the building)
now…
I have been experimenting with single-objects, multi-materials in terms of modeling.
I managed to lay out 9 groups of vertices which have assigned their own material.
The material i have been using for every object in this scene (for testing purposes of this) is my newly finished triplanar mapping shader.
This shader uses both normals, colormaps and speculars through the colormap’s alpha channel.
When i am running my scene, the scene consisting of only 12 unique objects (which contain a material tag) of which three torches that consist of a main model, the lit up part of the torch (and a few emitters casting flame decals.)
However the scene counts over 340 draw-calls!
I already tried to use the “Draw Call minimizer” from the asset store, but it won’t do anything because it claims i am using unity’s default material… (i am not, not in a single part of the scene…) but that won’t work…
So i think i best start with this question:
Does someone know if every projection of my triplanar shader adds a whole drawcall per object/material used? (so in the case of one unique colormap and one unique normalmap per material, it uses 6 calls to cast?)
The shader combines the colormap in this way:
fixed4 c = tex2D(_MainTex, IN.worldPos.xz/scale);
fixed4 c1 = tex2D(_MainTex, IN.worldPos.xy/scale);
fixed4 c2 = tex2D(_MainTex, IN.worldPos.zy/scale);
half4 result = lerp(c, c1, projnormal.z);
result = lerp(result, c2, projnormal.x);
(got to that snippet using a snippet i found of someone’s not finished old triplanar shader using google.)
Also i was wondering if every particle casted through an ellipsoid particle emitter is rendered in a different draw call.
Does any of you maybe have one or more pointers on where to look further?
Thanks in advance!


