![]() The dynamic shadows i use mainly to have a nice animation in the shadows that simulate the flickering of a torch. I am already using Unity Pro (hence the dynamic shadows) which is less, but probably still too many. Shadow caster count however still is at 64. I am using only 8 unique materials throughout the whole scene, only one uses a different shader (the 'burning' part of the torch mesh is using Unity's Self-Illumin/VertexLit shader.) all others use my custom triplanar shader.īy smartly disabling some smaller object's shadow caster tags i managed to slightly decrease the draw call count to roughly 320. maybe for each of these submeshes, another drawcall is added per light, does that seem likely? Looking at the mesh in the inspector i see the following details Ģ848 Verts, 1649 Tris, 9 Submeshes, uv, uv2. This is when enable the directional light i am using as sunlight and all elements of the torches, EXCEPT for their point light (using hard shadows each), immediately an increase of 78 draw calls! that's huuuge!Īnd when i enable the rest, only disabling the floor, flashlight and image effects Īfter disabling the seperate lightpoints and re=enabling them i have come to the following estimate:Įach dynamic light i add to this scene seems to add 60 to 70 drawcalls, is that normal behaviour? This is when i am only using the playerobject and the building itself, only 29 drawcallsĪll (dynamic) lights have been disabled too. Normally i have also SSAO and Bloom effects added to the camera, for easier comparison i disabled these effects. I've been toying some more with disabling separate objects and came to some interesting conclusions. I can't say doing this will 100% fix your draw call numbers, but at the very least combining your objects, uv mapping or simply using the same shader on objects with the same texture, should help a great deal. You also have 88 different shadows being cast, you could try baking your shadows too, 88 shadows seems rather extreme. It sounds like your model is made up of seperate pieces, with each piece having a different shader (custom?) applied, if all these use the same shader then it would be easier, and wiser, do group them/combine them in your 3d application into 1 single model and then apply them.ĭo you have the object UVmapped too? If not then I highly suggest doing so, should massivly reduce the draw calls (especially from textures and models). This isn't nessesarily going to fix your issue but why do you have 48 textures in use for that 1 building + the floor? That, to me, seems like an incredible number of textures, I've never before in a game seen 2 objects use this many textures. ![]() The shader combines the colormap in this way: So i think i best start with this question:ĭoes 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?) (i am not, not in a single part of the scene.) but that won't work. 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. However the scene counts over 340 draw-calls! 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.) This shader uses both normals, colormaps and speculars through the colormap's alpha channel. The material i have been using for every object in this scene (for testing purposes of this) is my newly finished triplanar mapping shader. I managed to lay out 9 groups of vertices which have assigned their own material. I have been experimenting with single-objects, multi-materials in terms of modeling. Screenshot of the main part of the scene and statisticsĬloseup of the main object (the building) Now when i started looking closely at my statistics, i notice my draw calls in a quite simple scene are well. 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.
0 Comments
Leave a Reply. |