DrawMeshInstancedIndirect not support WebGL?

Hi~

I just have a test for DrawMeshInstancedIndirect sample code:

Graphics.DrawMeshInstancedIndirect

It’s works great on windows platform(Standalone).

But nothing display when I build on WebGL.

So, dose DrawMeshInstancedIndirect works on WebGL?

Help please~ I really need this function. :frowning:

Dev environment:
Unity 2020.3.14f1
Win10

If it not support on WebGL, any method to optimize a great quantity of game object in the scence? Thank you!!~

What unity version and post the exact code

Unity 2020.3.14f1

Update to the latest LTS. If it still doesn’t work make a bug report

No dice unfortunately. WebGL doesn’t support compute buffers, which is what Graphics.DrawMeshInstancedIndirect hinges on.

1 Like

Oh man~ :hushed:

Khronos was working on a specification with Intel to add compute shaders to WebGL but the decision was made to “halt further expansion of the WebGL API” and instead focus on developing an alternative to WebGL. It’s currently in the draft stages of development though so it’s years out from being available in the browser let alone Unity.

https://www.khronos.org/registry/webgl/specs/latest/2.0-compute/

1 Like