# MeshWriter breaks batching. Is it possible to avoid it?

**URL:** <https://forum.babylonjs.com/t/meshwriter-breaks-batching-is-it-possible-to-avoid-it/56049>\
**Category:** Questions\
**Created:** [January 19, 2025, 1:31pm UTC](https://forum.babylonjs.com/t/meshwriter-breaks-batching-is-it-possible-to-avoid-it/56049 "2025-01-19T13:31:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lemcat](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lemcat/32/44469_2.png) [@Lemcat](https://forum.babylonjs.com/u/Lemcat)\
**Post date:** [January 19, 2025, 1:31pm UTC](https://forum.babylonjs.com/t/meshwriter-breaks-batching-is-it-possible-to-avoid-it/56049/1 "2025-01-19T13:31:47Z")

</div>

Here is a [playground](https://playground.babylonjs.com/#PL752W#150) where there are 6 text labels with almost the same parameters but there are 6 draw calls. Is it possible to use the same material between them all or do something other thing to get 1 draw call for all the labels?

---

<div class="post-metadata">

**Author:** ![HiGreg](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@HiGreg](https://forum.babylonjs.com/u/HiGreg)\
**Post date:** [January 19, 2025, 6:43pm UTC](https://forum.babylonjs.com/t/meshwriter-breaks-batching-is-it-possible-to-avoid-it/56049/2 "2025-01-19T18:43:46Z")

</div>

Merging the meshes appears to be the only solution to reducing draw calls. You’d lose the ability to independently move the text.

I tried assigning the same material to each mesh, but it made the color the same and did not reduce the number of draw calls. (If it did reduce draw calls, I expected to be able to change vertex colors if different colors are needed).

There is a Feature Request for multiple particle systems with the same material to share a draw call, but not sure if that would affect SPS, which is what MeshWriter uses.

---

<div class="post-metadata">

**Author:** ![Lemcat](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lemcat/32/44469_2.png) [@Lemcat](https://forum.babylonjs.com/u/Lemcat)\
**Post date:** [January 20, 2025, 12:47am UTC](https://forum.babylonjs.com/t/meshwriter-breaks-batching-is-it-possible-to-avoid-it/56049/3 "2025-01-20T00:47:03Z")

</div>

> [@HiGreg](#):
>
> I tried assigning the same material to each mesh, but it made the color the same and did not reduce the number of draw calls

That’s strange. Why doesn’t having the same materials for all meshes not reduce the amount of draw calls? Too complex meshes break batching?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [January 20, 2025, 9:19am UTC](https://forum.babylonjs.com/t/meshwriter-breaks-batching-is-it-possible-to-avoid-it/56049/4 "2025-01-20T09:19:36Z")

</div>

Merging meshes does work for me (single draw call):

> **[Babylon.js Playground](https://playground.babylonjs.com/#PL752W%231656)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL and WebGPU 3D scenes

---

<div class="post-metadata">

**Author:** ![Lemcat](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/lemcat/32/44469_2.png) [@Lemcat](https://forum.babylonjs.com/u/Lemcat)\
**Post date:** [January 20, 2025, 4:49pm UTC](https://forum.babylonjs.com/t/meshwriter-breaks-batching-is-it-possible-to-avoid-it/56049/6 "2025-01-20T16:49:10Z")

</div>

> [@Evgeni\_Popov](#):
>
> Merging meshes does work for me (single draw call):

Looks it’s a broken link?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [January 20, 2025, 5:05pm UTC](https://forum.babylonjs.com/t/meshwriter-breaks-batching-is-it-possible-to-avoid-it/56049/7 "2025-01-20T17:05:07Z")

</div>

Fixed!
