2 Star 0 Fork 0

mirrors_googlefonts/compute-shader-101

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Compute shader toy based on wgpu

This is a starting point for running compute shaders and drawing the image output into a window, based on wgpu. You should be able to change the shader (paint.wgsl) and run using simply cargo run.

If there are syntax errors in the shader, the error message can be pretty cryptic. It might be useful to run naga from the commandline to validate the shader code.

The shading language for this example is WGSL, translated by naga, but it is possible to run wgpu in native mode with SPIR-V shaders as well. At the time of this writing, compute shaders are blocked on [naga#875], but when the fix for that lands, the experience should be better, and that will also open up features like atomics (and possibly subgroup operations) that are not presently supported by the wgpu stack.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_googlefonts/compute-shader-101.git
git@gitee.com:mirrors_googlefonts/compute-shader-101.git
mirrors_googlefonts
compute-shader-101
compute-shader-101
main

搜索帮助