public 3d-motion repository
webassembly-webgl-shaders
// DanRuta/webassembly-webgl-shaders
Demo project for using WebGL shaders in WebAssembly
$ git log --oneline --stat
stars:121forks:30updated:2025-07-24
README.md
WebAssembly WebGL Shaders
Example project for using WebGL shaders in a WebAssembly program.
Article link
https://medium.freecodecamp.org/how-to-use-webgl-shaders-in-webassembly-1e6c5effc813
Run npm install, for dependencies, node server to serve files, and grunt for compiling changes.
To compile:
emcc -o ./dist/appWASM.js ./dev/cpp/emscripten.cpp -O3 -s ALLOW_MEMORY_GROWTH=1 -s USE_WEBGL2=1 -s FULL_ES3=1 -s WASM=1 -s NO_EXIT_RUNTIME=1 -std=c++1z -s EXTRA_EXPORTED_RUNTIME_METHODS="['ccall','stringToUTF8']" -s ASSERTIONS=1
or compile with DISABLE_DEPRECATED_FIND_EVENT_TARGET_BEHAVIOR=0 (Thank you veslam)