Transparent break down gpu instancing with standard shader


THIS IS BUG??

Hi,

Here in the doc for dynamic batching they said : " Semi-transparent Shaders usually require GameObjects to be rendered in back-to-front order for transparency to work. Unity first orders GameObjects in this order, and then tries to batch them, but because the order must be strictly satisfied, this often means less batching can be achieved than with opaque GameObjects. "
So I think your result is correct.

emmm,gpu instancing is not the dynamic batching,is better performance way than dynamic batching.

Sorry, I made a mistake.
But maybe this line "Some factors can prevent GameObjects from being instanced together automatically. These factors include Material changes and depth sorting. Use Graphics.DrawMeshInstanced to force Unity to draw these objects using GPU instancing " from here could help you, since transparent object are drawn from back to front.

Thats not necessarily true about performance. It depends on what is instanced, how many instances with different shader inputs, hardware etc etc.

All I am saying is don’t assume that turning on instancing will be faster than batching. Sometimes it will and sometimes it wont, test both and find whats right for your game.

1 Like