yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
7e278c3ad
master
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.
1# Simple WebGPU example using Slang WebAssembly library 2 3## Description 4 5This is a simple example showing how WebGPU applications can use the slang-wasm library to compile slang shaders at runtime to WGSL. 6The resulting application shows a green triangle rendered on a black background. 7 8## Instructions 9 10Follow the WebAssembly build instructions in `docs/building.md` to produce `slang-wasm.js` and `slang-wasm.wasm`, and place these files in this directory. 11 12Start a web server, for example by running the following command in this directory: 13 14$ python -m http.server 15 16Finally, visit `http://localhost:8000/` to see the application running in your browser.