Hi~
I use GPU instace and ComputeBuffer&Shader made this:
100,000 cubes
It’s amazing! But I cant run it on WebGL.
I wanna create a voxel terrain or voxel house with GPU Instance.
If WebGL dose not support ComputeShader and ComputeBuffer, what should I do?
Is here have any method update GUP instance’s position in GPU?
It should work: https://discussions.unity.com/t/793050
It may depend on the render pipeline though. GPU instancing works with a custom shader in legacy render pipeline. That custom shader however has to be compatible with WebGL v2. Compute shaders are not supported in WebGL.
URP and HDRP however have a concept of batching that’s supposed to replace (the need for) GPU instancing. For WebGL you should definitely use URP and also be on the latest Unity tech stream version as any incremental improvement can still make a huge difference in WebGL.
General advice: anything for WebGL needs to be scaled down by a factor of 10 to 100. Roughly speaking. WebGL is NOT a high-performance platform. It is currently single-threaded with severe restrictions on the rendering side.