[Public WebGL] New multi_draw extensions

Wayne Langman ([email protected]) [email protected]
Fri Feb 22 11:44:04 PST 2019


Hoping ‘all platforms’ includes mobile =)

Sent from my iPhone

> On Feb 22, 2019, at 21:18, Fernando Serrano García ([email protected]) <[email protected]> wrote:
> 
> just a nit: I tried the examples on the slides and I got the following on the console: "Disabling use_ubos. webgl_version is not 2."
> I guess both urls should include the "&webgl_version=2" isn't it?
> 
> Excited to give it a try!
> 
>> On Fri, Feb 22, 2019 at 7:36 PM Ken Russell ([email protected]) <[email protected]> wrote:
>> Fantastic!
>> 
>> For scenes which are well sorted by state/material, the available speedups from these extensions are tremendous. We look forward to what's possible in Babylon and other 3D engines on the web!
>> 
>> Great work Austin and Kai! Looking forward to other browsers implementing these, too, and moving them to community approved quickly!
>> 
>> -Ken
>> 
>> 
>>> On Fri, Feb 22, 2019 at 10:30 AM David Catuhe ([email protected]) <[email protected]> wrote:
>>> Just created an issue to support them ☺
>>> 
>>> https://github.com/BabylonJS/Babylon.js/issues/5962
>>> 
>>>  
>>> 
>>> From: [email protected] <[email protected]> On Behalf Of Austin Eng ([email protected])
>>> Sent: Friday, February 22, 2019 10:22 AM
>>> To: [email protected]
>>> Subject: [Public WebGL] New multi_draw extensions
>>> 
>>>  
>>> 
>>> Resending this because the previous email was likely marked as spam.
>>> 
>>>  
>>> 
>>> WebGL community,
>>>  
>>> 
>>> Two new extensions are in development which provide better batching for draw calls:
>>>  
>>> 
>>> WEBGL_multi_draw
>>> WEBGL_multi_draw_instanced
>>>  
>>> 
>>> 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 from the JavaScript application down into the WebGL implementation.
>>>  
>>> 
>>> 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 shaders.
>>>  
>>> 
>>> A few examples of how these APIs can be used are in this repository:
>>> https://github.com/kenrussell/webgl-animometer
>>>  
>>> 
>>> The potential speedups are dramatic. Microbenchmarks show anywhere from a 2-3x speedup to a 70x (!) speedup in Chrome, compared to making tiny individual draw calls from JavaScript. Prototypes in other 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 extensions!
>>>  
>>> - Austin Eng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20190222/91316514/attachment.html>


More information about the public_webgl mailing list