Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default glslPath gives error #6

Open
philogb opened this issue Dec 12, 2021 · 1 comment
Open

Default glslPath gives error #6

philogb opened this issue Dec 12, 2021 · 1 comment

Comments

@philogb
Copy link

philogb commented Dec 12, 2021

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.

@dmnsgn
Copy link
Owner

dmnsgn commented Dec 12, 2021

👋 The default path is "@webgpu/glslang/dist/web-devel/glslang.js" and is resolved via the importmap:

"@webgpu/glslang/dist/web-devel/glslang.js": "./@webgpu/glslang/dist/web-devel/glslang.js",
"@webgpu/glslang/dist/web-devel/glslang.wasm": "./@webgpu/glslang/dist/web-devel/glslang.wasm",

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants