WASM bindings for naga-oil.
npm install naga-oil-wasmbash
npm install naga-oil-wasm
`
Documentation
You can view the naga_oil official documentation here.
Basic Usage
`ts
const shaderLib = new ShaderLibrary();
// Register composable shader modules
// You must define the module name so that the shader can import it
shaderLib.register_module(
);
// Shader definitions
const shaderDefs = new ShaderDefs();
shaderDefs.add("MAX_LIGHTS", ShaderDefValue.new_int(10));
// Process the shader
const processedShader = shaderLib.process(
, shaderDefs);
console.log(processedShader); // Output the processed shader
``