yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
f8cb9c4d6
master
files
| README.md | 662 B |
| example.js | 5.4 KiB |
| index.html | 262 B |
| shader.slang | 521 B |
Simple WebGPU example using Slang WebAssembly library
Description
This is a simple example showing how WebGPU applications can use the slang-wasm library to compile slang shaders at runtime to WGSL. The resulting application shows a green triangle rendered on a black background.
Instructions
Follow the WebAssembly build instructions in docs/building.md to produce slang-wasm.js and slang-wasm.wasm, and place these files in this directory.
Start a web server, for example by running the following command in this directory:
$ python -m http.server
Finally, visit http://localhost:8000/ to see the application running in your browser.