A lightweight WGSL compiler with support for file linking, preprocessing, and multiple output formats for WebGPU shaders.
Include other WGSL files in your shaders for better organization and reusability.
C-like preprocessor with macros and conditional compilation for flexible shader variants.
Build to WGSL, JavaScript, or TypeScript files from a single source.
Built-in obfuscator, minifier, and prettifier to adapt your code for any environment.
Choose between ESM (export) or CommonJS (module.exports) for JS/TS outputs.
File validation and format checking to catch issues early.
Install globally for easy access:
Or use npx for one-off runs:
<inputFiles...>: One or more .wgsl files to process-o, --output <path>: Path to the output file (must be .wgsl, .js, or .ts)--export-type <type>: Export type for .js or .ts outputs (esm or commonjs)WGSL-Plus supports both standard C-like preprocessor directives and custom WGSL-specific directives.