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.
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
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
Ryiah
May 23, 2022, 6:18pm
7
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/
WebGPU is a JavaScript API provided by a web browser that enables webpage scripts to efficiently utilize a device's graphics processing unit (GPU). This is achieved with the underlying Vulkan, Metal, or Direct3D 12 system APIs. On relevant devices, WebGPU is intended to supersede the older WebGL standard.
Google Chrome enabled initial WebGPU support in April 2023. Safari and Firefox have not yet enabled theirs. The W3C standard is thus in the working draft phase.
WebGPU enables 3D graphics with...
1 Like