-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Custom shader wasm-compatible? #360
Comments
I'm glad you are enjoying it, so far! I haven't tried using a custom shader with the WebGL backend, but I can confidently say crashes are never expected. My first guess is that it could be relying on something that isn't quite working on WebGL yet. Sample code (and maybe the backtrace or other error messages) would probably be helpful. But in the meantime, I could attempt to combine the two examples independently and see if I can reproduce the issue. |
That's exactly what I did :) https://github.com/scambier/pixels-wasm-shader I also got a more complete error message (I wasn't using run-wasm in my other project):
It looks like it's fixable directly in the shader code gfx-rs/wgpu#2832 That's a good excuse to learn a bit of wgsl and try to fix that myself 👍 |
I'm using pixels for my own project, with the minimal-web example as a base. It works quite well, and I'm having fun with it :)
I've been trying to integrate the noise shader example, and while it works in native build, the wasm build crashes at startup.
It seems the crash happens during the call to
Device::create_render_pipeline
. Is it expected (i.e. are there modifications to apply to make the custom shader work for the web), or is there something broken on my side?The text was updated successfully, but these errors were encountered: