Page 1 of 1

Disable batching tag

PostPosted: Fri Sep 28, 2018 8:17 am
by AndrewMyriad
Hi there,

I'm trying to learn a bit about optimisation and getting to grips with the Unity profiler.

One thing I came across today was a bunch of draw calls to objects in the scene. I noticed a lot of them have a comment in the profiler that says "The shader explicitly disables batching with the 'DisableBatching' tag", but the shader (made in ASE) doesn't have that tag set (see screenshot).

Do certain settings in the shader set this to be true, but... not change the bool or something? I'm not entirely sure how this works!

Any feedback would be great.

Thanks!

Re: Disable batching tag

PostPosted: Fri Sep 28, 2018 10:30 am
by Amplify_Borba
Hello Andrew, thank you for getting in touch!

In order to use the Shaderlab's SubShader Tags that are not exposed in our editor, you'll need to add them in the Output Node's parameters, more specifically within the 'Custom SubShader Tags' section.

Please refer to the image below:

Image

Please let me know if this helps, thanks!

Re: Disable batching tag

PostPosted: Sat Sep 29, 2018 12:34 am
by AndrewMyriad
Hi, thanks for the reply!

Wouldn't DisableBatching be set to false by default? The example I posted in the screenshot had Unity profiler telling me that batching was disabled by the shader, but I didn't set any custom tags anywhere.

Re: Disable batching tag

PostPosted: Mon Oct 01, 2018 10:28 am
by Ricardo Teixeira
AndrewMyriad wrote:Hi, thanks for the reply!
Wouldn't DisableBatching be set to false by default? The example I posted in the screenshot had Unity profiler telling me that batching was disabled by the shader, but I didn't set any custom tags anywhere.


Hey there,

It should be ON by default but certain configurations could break batching, so to speak. Can you share the shader for further examination?

Additional information, here!

Thanks!