WebGPU Support

Avatar
  • updated
  • Completed

Hey, it seems like Shapes doesn't support the new WebGPU rendering backend. There are lots of errors about redefinitions when the project is built that I'm just not savvy enough with shaders to parse. I appreciate that WebGPU support is currently experimental so not many people are using it 😊 happens for all render pipelines, reproduction steps:

  1. blank project in unity 6.1 or above
  2. web build profile
  3. Enable the WebGPU API (and remove the WebGL fallback)
  4. Build
Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Avatar
Freya Holmér creator
Quote from Hendrik Schulte

I managed to fix this by changing Shapes Math.cginc line 8 to

#define SUPPORTS_LOWP_OVERLOADS (defined(SHADER_API_METAL) == false && defined(SHADER_API_VULKAN) == false && defined(SHADER_API_WEBGPU) == false)


Would be nice to have an official fix incoming.

was there anything else you had to do to get webgpu up and running?

Avatar
Freya Holmér creator
  • Completed

this has now been fixed! coming with the next update

Avatar
Hendrik Schulte

I managed to fix this by changing Shapes Math.cginc line 8 to

#define SUPPORTS_LOWP_OVERLOADS (defined(SHADER_API_METAL) == false && defined(SHADER_API_VULKAN) == false && defined(SHADER_API_WEBGPU) == false)


Would be nice to have an official fix incoming.