Hi,
I would like to know if GPU Instancing works in WebGL, when I activate it on Editor Mode, I have a huge impact of performances (from 10000 to 100 draw calls), but it does not seem to have any impact in my webgl build.
I use the version 2019.3.
Thank your for your help.
The Unity manual says GPU Instancing is supported on WebGL so long as using WebGL 2.0 API. Not all browsers have WebGL 2.0 support.
Browser support: (Safari is the big one without 2.0, says Edge doesn’t either but the page hasn’t been updated since Edge switched to Chromium)
Some info on WebGL 2.0, including detecting if running with 2.0 support:
Says GPU Instancing only supported on 2.0:
Hello Joe-Censored,
First of all thanks for your help
I changed the build option to WebGL 2.0 but it did’nt change anything. I’m on the last version of Chrome, so it should wordk 
Thanks in advance,
Hello,
Maybe the problem on WebGL it’s not the draw calls it might be something else. To be really sure is it possible to know the number of draw calls in WebGL. I searched but don’t know if it’s possible.
Thanks for your reply,
Hello,
Anyone has a response ?
Thanks in advance
I did a test where I disabled and enabled the GPU instancing of a shared material in a WebGL build using material.enableInstancing =
First, this did not work, because the Instancing Variants graphic setting was set to ‘Strip Unused’, and this material variant was stripped out. Changing this to ‘Keep All’ solved it. -,A better way would probably be to use two different materials so the stripping doesnt think it is unused.
When it works, the difference was significant, 150 cars (sharing same mesh and material ) rendered with twice as much FPS when the instancing was properly enabled. Hope this might help others.
7 Likes