dgel icon indicating copy to clipboard operation
dgel copied to clipboard

Default glslPath gives error

Open philogb opened this issue 4 years ago • 1 comments

I was getting errors from the default glslPath and was able to fix it by passing in:

const glslangPath = "https://cdn.jsdelivr.net/npm/@webgpu/[email protected]/dist/web-devel-onefile/glslang.js";

To the context.init function.

In general, though, I think it would be OK to just remove the glsl creation if we're choosing wsgl by default.

philogb avatar Dec 12 '21 21:12 philogb

👋 The default path is "@webgpu/glslang/dist/web-devel/glslang.js" and is resolved via the importmap: https://github.com/dmnsgn/dgel/blob/228fde8bb5691e24e1a6c91333cd0596153c7045/web_modules/import-map.json#L3-L4

Passing glslangPath to await context.init() 4th arg (not the prettiest api) is indeed the way to go if you don't want to use importmap.

In general, though, I think it would be OK to just remove the glsl creation if we're choosing wsgl by default.

Agreed, the dual mode is pretty new so I haven't allowed that yet.

dmnsgn avatar Dec 12 '21 21:12 dmnsgn