Some Threejs webgpu examples run fine on firefox, but others dont?

Hi guys, I’m currently deep into a project in webgpu focusing on a lot of the newer examples on the homepage.Im curious why half the webGPU examples seem to run fine even though webgpu is supposedly not supported in firefox. I get that there is a webgl fallback for many effects, so that brings me to the question:

Are the webgpu examples on the homepage webgpu specific, as in only webgpu can run them? or do most of them have an equivalent fallback than runs in firefox etc? Or can firefox run certain webgpu scenes but not others? I cant see any fallback to webgl in the code so is it handled automatically? Is it only the TSL pages that don’t run in FF?

Thanks for any insight. I guess I would like some clarity in if its actually necessary to commit to the webgu workflow if I can get away with 90% of it in GL i would sacrifice some parts.

1 Like

No. There are some examples that use WebGPU specific API but most of them should run with a WebGL 2 backend as well.

Yes, WebGPURenderer automatically falls back to WebGL 2 if WebGPU isn’t available.

No, TSL is an integral part of the node material and that is compatible with both WebGPU and WebGL 2. TSL can be compiled to WGSL and GLSL.

We try to improve to compatibility of both backends as good as possible. If examples are not supposed to run with WebGL 2, they should throw a controlled error e.g. No WebGPU support.

1 Like