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

Update WGPU to v0.13 #340

Merged
merged 7 commits into from
Jul 28, 2022
Merged

Update WGPU to v0.13 #340

merged 7 commits into from
Jul 28, 2022

Conversation

dhardy
Copy link
Collaborator

@dhardy dhardy commented Jul 27, 2022

Replaces #331.

One shader was translated to WGSL as a proof of concept. GLSL shaders will remain to ease any future OpenGL implementation; in general there doesn't seem to be motivation to switch the shader language.

@dhardy
Copy link
Collaborator Author

dhardy commented Jul 28, 2022

There is a motivation to switch to WGSL: no need for a GLSL compiler and the option to embed WGSL in Rust. I translated Mandlebrot's shaders in this branch.

But, I feel, there are significant drawbacks:

  • GLSL code is much cleaner
  • The WGSL spec is incomplete (e.g. no mention of f64 support yet, which does work, though literals appear to be missing)
  • WGSL validation for embedded shaders only happens at run-time (though naga can be run directly for fast validation)

@dhardy dhardy merged commit f2c0c6c into master Jul 28, 2022
@dhardy dhardy deleted the wgpu13 branch July 28, 2022 11:10
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

Successfully merging this pull request may close these issues.

1 participant