Local glslang and twgsl path doesn't work anymore in 6.25.0

Hello! Since the version 6.25.0 it’s impossible to set the local script file path for both glslang and twgsl. This code was working in 6.24.0.

const  engine = new BABYLON.WebGPUEngine(canvas, {
        antialias: true,
        powerPreference: 'high-performance',
        glslangOptions: {
          jsPath: 'scripts/glslang.js',
          wasmPath: 'scripts/glslang.wasm',
        twgslOptions: {
          jsPath: 'scripts/twgsl.js',
          wasmPath: 'scripts/twgsl.wasm',

Error for the version it’s 6.25.1 and upper*.

Got it, let’s try solving this.
Can you try setting BABYLON.Tools.ScriptBaseUrl to either your host or an empty string and see if that solves the issue?

It works but not as it should. If I set the value to “” to BABYLON.Tools.ScriptBaseUrl, it will check to the root of the computer “file:///C://scripts/twgsl.js”. But if I write “scripts” it will find it because it will check the scripts dir from the host so the jsPath become

BABYLON.Tools.ScriptBaseUrl = 'scripts';
jsPath: 'twgsl.js' /*output static/scripts/twgsl.js*/,

Got it. i’ll work on a solution to the empty string. I believe i know what causes this.

1 Like

What about ScriptBaseUrl = "./"?

It does works.

jsPath: 'scripts/twgsl.js'

and “/” didn’t?.. I can’t quite reproduce this one, but I will keep on trying.