If I want to use a webgpu then the current shader won't work

webgpu is already available in the browser if I need to package a webgpu project now. So my shader should be changed to wgsl language development?

Hello!

Just to understand fully, are you asking whether or not you need to convert your shader from glsl to wgsl for it to work with WebGPU?

If so, no, we transpile the glsl shaders to wgsl for WebGPU :slight_smile:

Thanks,
Gustav

3 Likes

Yes, that’s what I meant. So, if I’m only developing a WebGPU project, I can write shaders using only GLSL instead of learning WGSL because the engine will handle the conversion for me.
If I write shaders using WGSL, they can only run in browsers that support WebGPU.
Is my understanding above correct?

thanks.

Yes, that is correct.

2 Likes