Early access to the new WebGPU backend

@JoeAN I hadn’t tested webcam on iOS specifically, but I just did and you’re right, webcam isn’t showing up. Seems to be a general WebKit issue, Safari Tech Preview on macOS also isn’t working. I’ll submit a WebKit bug.

1 Like

Hi, WebGPU is amazing so far!
it fixed many problems I had for a long time in WebGL.

was just wondering if you can add Disable Exceptions in the WebAssembly 2023
to improve the performance a little bit more

Hello guys !
Good job with this new update.

Unfortunatly my game isnt loading on mobile (iOS chrome + safari) but working well on laptop.
I tried with a blank scene and I too have a black screen on mobile webgpu when the game finished loading (after splash screen).
(see attached)
Tried with both URP and buit-in shaders but same result. There seem to be shader issues.
Also i disabled HDR and set the rendering to Deffered. I also enabled Compatibilty Mode.


Any suggestions ?

WebGPU for iOS requires iOS 18+, and you have to enable WebGPU in the Safari settings (Settings/Apps/Safari/Advanced Features/WebGPU).

2 Likes

aw okay ! thanks for your reply.

not very UX friendly tho … Any workaround ?
or dates when it will be fixed ?

Also how come the WebGPU Boat Demo works ? (https://boat-demo.cds.unity3d.com/)

You need to ask Apple. :wink:

WebGL v2 has been such an “enable at your own risk” setting for Safari until iOS 15 if I remember correctly. That was years behind every other platform and browser supporting WebGL v2 like it was normal (it was).

Given that, I wouldn’t hold my breath to see official WebGPU support on iOS before 2030. Not sure if I’m being a pessimist or realist here, we’ll see in about five years. :stuck_out_tongue_winking_eye:

Apple isn’t too keen on supporting the latest Web technology because it threatens their otherwise walled-off platform. Maybe if we get lucky and things have changed, then maybe, maybe, perhapsly, sometime in 2027 is my most optimistic guess.

3 Likes

I think that in regards to WebGPU, seems like they working on it and investing much more than they worked on WebGL2.
I’m more optimistic

Apple make sure to do everything to stall open web development. They don’t allow webgpu and ignore webxr as much as they can. They can do everything they just stall it

I have found that WebGPU is enabled by default now with iOS 18.2.
Apple has been working in the open on WebGPU. The WebKit source code has their latest WebGPU work in it. What hasn’t been known is their release schedule, but now with 18.2 it’s looking very promising that it will be on by default in that version.

7 Likes

WebXR in ios used to be experimental option to enabled in safari for ios 16 (it did not work though just have API provided). Everyone hope it will be released immersive AR in ios 17 for iphone

Not only it was remove option in iphone and making it available only in vision pro, it don’t support immersive AR and only allow VR mode

WebGPU may or may not be the same. But apple always have a case like this

I wouldn’t compare WebXR development to WebGPU development. Separate teams, separate product management decisions. It is true that with Apple you cannot plan on unshipped software, which is really frustrating. But from my experience Apple has been very invested in WebGPU, if for no other reason than WebGL is a maintenance hassle for them and they were involved with WebGPU design from the beginning to be easier to maintain. Web APIs may move at a relatively slow pace for adoption, but that’s not a bad thing. Much more at stake with the web, particularly with security.

1 Like

@JoeAN Apple fixed their webcam issue with WebGPU, 281680 – [WebGPU] WebCam texture doesn't work with WebGPU. They do not share any timeframes for when fixes roll out to iOS or macOS, but sometime in the near future.

2 Likes

Alright, thanks for the help!

Might be a stupid assumption, but I assume with WebGPU we won’t have the 16 per-camera realtime light limit?

If so, we are -really- looking forward to it. :smiling_face:

@KamilCSPS Light limit for which rendering pipeline? Taking a look at the shader code, URP defines MAX_VISIBLE_LIGHTS as 32 for WebGPU.

thats interesting… I still cannot get good answers as to why my webgl dungeon lights leak and cause greif…

For URP. The 32 limit is surprising as we didn’t notice a difference between WebGL / WebGPU when testing our project. I’ll need to find time to do a quick minimal repro to be sure…

Nevertheless, is 32 a limitation of the WebGPU specification (or is it forced upon due to Mobile’s 32 limit?) or can we expect it match PC’s 256 eventually?

Ref: Unity - Manual: Introduction to rendering paths in URP

I haven’t done much research yet in light limits, but now that it’s brought up I will do some research when I get a chance.

Technically it is a limit imposed by URP, not by WebGPU or WebGL. But WebGPU does have GPU limits that tend to be smaller than desktop APIs for things like maximum buffer sizes or the number of textures per shader unit, and skew more toward Mobile level limits in order to be as platform agnostic as possible. So 256 lights may be a bit much, but until I do some research I’m just speculating.

Another factor is that, at least with Forward+, light sorting is actually quite CPU intensive the more lights you have, and more so on web than other platforms because web lacks Burst multithreading.

1 Like

A quick analysis of max light count with Forward+ with 100 spot lights pointing at a plane, all visible to the camera.

32 of the 100 lights are rendered, for both WebGL and WebGPU.
F+ tiling takes 1ms, because Burst can’t be threaded on the web.

To support > 32 lights (the 256 desktop platforms get), it has to use an SSBO buffer instead of a UBO buffer, because UBO buffer sizes are limited. SSBO buffers are slower to access than UBO, so there’s additional performance hit from that, even if we gave WebGPU the higher limit.

I get there are reasons to want more than 32 realtime lights, but it would come at a significant performance cost. It would take some significant work to make it happen.

Sometimes I’m jealous of the other platforms, and their seemingly unlimited CPU+GPU+Memory+Disk resources. But the web is awesome for many other reasons.

2 Likes