playcanvas / engine

JavaScript game engine built on WebGL, WebGPU, WebXR and glTF
https://playcanvas.com
MIT License
9.69k stars 1.36k forks source link

Support WGSL shaders #5925

Open erikdubbelboer opened 10 months ago

erikdubbelboer commented 10 months ago

PlayCanvas is currently using glslang and twgsl to transpile GLSL into WGSL. This doesn't support all new features in WGSL which are not usable now.

Things like

The shader generator will need to be changed and all current shaders will need to be rewritten. It will need to be possible for developers to provide shader chunks for both GLSL and WGSL at the same time for backwards compatibility.

mvaligursky commented 9 months ago

related: https://github.com/playcanvas/engine/issues/5691