Overview of luma.gl Shaders
masterluma.gl applications require shader source code to run on the GPU. Depending on the target backend (WebGPU or WebGL 2), this code must be provided as WGSL or GLSL. luma.gl provides tools to assemble this source, bind inputs, and execute it through the engine APIs.
Key workflows include:
- Shader Assembly: Combining application-specific source with reusable shader code using
ShaderAssembler,ShaderModule, andShaderPlugin. - Customizable Shaders: Using
ShaderPluginandShaderAssemblerto allow optional features to modify a base shader without duplicating code. - Portable Shaders: Writing shaders that work across both WebGPU and WebGL 2 using
ModelandWGSL Support. - Shader Passes: Running image effects or fullscreen texture stages using
ShaderPassandShaderPassRenderer.