HTML 5 batch size limited to 30...

16 views
Skip to first unread message

Thomas John

unread,
May 21, 2018, 8:08:08 PM5/21/18
to Genome2D
Is there any plan soon to raise that batch size, like using the same technique than for stage3d, that allows for thousands of draws per batch ?
thx.

sHTiF

unread,
May 24, 2018, 5:52:48 PM5/24/18
to Genome2D
Genome2D on Stage3D uses the same batching as on WebGL and that is batching through GPU constants instead of GPU buffer. This results in very low (compared to buffer) batch counts but at the end avoids reuploading buffer data to GPU on each frame which results in better overall performance even with higher DrawCall count in most cases. It would need a very specific scenario or a static batching (disabling the gpu buffer reupload if the scene is static) to get better performance using buffers. Anyway in most cases draw calls are not the bottleneck, texture switches and fillrate are.

Do you have any specific scenario in mind or are you just hunting for lower draw calls?

Thomas John

unread,
May 24, 2018, 6:03:21 PM5/24/18
to sHTiF, Genome2D
when I test on chrome, the more draw calls I have, the less I can draw. I increased the batch size to 500 (default is 30) and it increased the number of sprites I could draw...
I directly use the "context.draw" method. Just drawing a texture at a certain coordinate with a specific scale... No special shader involved. The basic thing. And the texture is 512*512, so no big deal.
Oh, and I do that on the preRender "callback".

--
You received this message because you are subscribed to the Google Groups "Genome2D" group.
To unsubscribe from this group and stop receiving emails from it, send an email to genome2d+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thomas John
Reply all
Reply to author
Forward
0 new messages