- Home /
Questions about toon basic outline shader, batching and draw call
Hi, I have models which use toon basic outline shader. The problem is that Unity doesn't batch those models. Each model has 2 draw calls, so the overall draw calls are multiplied by the amount of objects in game. But I notice that if I change the shader to toon basic (without outline) then Unity can batch all objects properly (it has only one draw call). What's the problem with toon basic outline? Is there a way to work around this problem? And is it possible to have toon shade with outline with only one draw call?
Answer by KamiKaze425 · Jan 15, 2013 at 07:47 PM
Unity's batching has a bunch of restrictions, like vertex count, scaling, and shader passes. The reason why the toon basic outline doesn't work is because it takes two passes per object (2 draw calls) rather than one pass. I'm mostly responding to this even though it's a few months old just because I'm trying to find a single pass toon shader with outline too and do not know if it's possible.
Answer by KOORY · Jan 05, 2018 at 12:45 PM
Drawing mesh A = 1 Draw call, Drawing mesh A Outline = Another draw call
Your answer
Follow this Question
Related Questions
draw call batching with tint color 2 Answers
Transparent shader breaks static batching? 0 Answers
Dynamic Batching not working even adhering to all rules 3 Answers
Batching problem when using multiple materials in one model 1 Answer
Shader Warning Problem 0 Answers