WebGPU and shaderc.wasm

Yo @sebavan … Did the WebGPU dump the shaderc stuff.

Before i was doing something like this:

                if (navigator.gpu) {
                    engine = new BABYLON.WebGPUEngine(divcvs);
                    await engine.initAsync({ wasmBinaryFile: "###SCRIPT###/shaderc.wasm" }).catch((ex)=>{
                        showErrorMessage(ex.message || "Unknown WebGPU Exception");
                    });
                    BABYLON.Tools.Log("WebGPU graphics render engine loaded (Experimental)");
                } else {
                    BABYLON.Tools.Warn("WebGPU is not supported on platform. Falling back to WebGL");
                    engine = new BABYLON.Engine(divcvs, antialias, {premultipliedAlpha: false}, adaptive);
                }

Now it seems to use glslang.wasm instead… Can i just grab copies from https://preview.babylonjs.com/glslang/

Do i need both the js and wasm options:

// Default glslang options.
    private static readonly _glslangDefaultOptions: GlslangOptions = {
        jsPath: "https://preview.babylonjs.com/glslang/glslang.js",
        wasmPath: "https://preview.babylonjs.com/glslang/glslang.wasm"
    };

Yup, you need both bug it might even not be spirv in the end so stay tuned as we may not even be able to rely on glsl :frowning:

Thanks @sebavan … I will keep watching :slight_smile: