[Public WebGL] New multi_draw extensions
Austin Eng ([email protected])
Fri Feb 22 10:21:47 PST 2019
Resending this because the previous email was likely marked as spam.
Two new extensions are in development which provide better batching for
Compared to instancing, which is available as an extension in WebGL 1.0 and
is core in WebGL 2.0, multi_draw provides more flexibility. It essentially
allows the parameters to multiple calls to drawArrays and drawElements to
be assembled in arrays, and sent down to the WebGL implementation with one
call. This eliminates a large amount of overhead when repeatedly calling
Per-draw-call data can be sent down in multiple ways, including in uniform
buffers (WebGL 2.0) indexed by a new gl_DrawID variable available in
A few examples of how these APIs can be used are in this repository:
The potential speedups are dramatic. Microbenchmarks
show anywhere from a 2-3x speedup to a 70x (!) speedup in Chrome, compared
browsers show ~4x speedups too; the benefits are universal.
Please give these extensions a try. They’re currently available in Chrome
Canary on all platforms by enabling WebGL draft extensions in about:flags,
and are coming to more browsers soon. A BaseVertex variant of the
extensions is also planned.
We would appreciate your feedback on how well the multi_draw extensions
work for your applications, and any suggestions for continued enhancement.
Thanks to Kai Ninomiya from Google for support in developing these
- Austin Eng
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the public_webgl