+1 vote

I created a test scene with a Grid Container containing 135 panels. Please take a look at the images that I have linked:

https://imgur.com/a/ShPZAZg

After running the test scene, I found out that each panel needs one draw call. Thats 135 draw calls for just the ui. Is it possible to batch these, to reduce the draw calls?

Godot Engine 3.2.3 stable
GLES2 Renderer

in Engine by (69 points)
edited by

1 Answer

0 votes

If you use Godot 3.2.2 or later, switch to the GLES2 renderer to benefit from 2D batching.

GLES3 batching will be added in a future 3.2.x release: https://github.com/godotengine/godot/pull/42119

The Vulkan renderer in the master branch doesn't support batching, but since draw calls are much cheaper in Vulkan compared to OpenGL, it's not really an issue in practice.

by (10,271 points)

Hi. I forgot to mention my godot version. Here it is:
Godot Engine 3.2.3 stable
GLES2 Renderer

In the "Rendering" tab in settings, under "Batching", I have "Use Batching" and "Use Batching in Editor" enabled. However, as you can see, the draw call is still enormously high (same as the one in the picture), which is kind of weird. So I'm not sure why it is so high.

I tried applying one shared material across all the panels, yet it didnt change anything.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.