Overview
luma.gl applications must provide the shader source code that will ultimately run on the GPU. Such code must be provided as WGSL and/or GLSL depending on which backend(s) are targeted. luma.gl helps assemble that source, bind its inputs, and run it through the engine APIs.
| Question | Guide page | Main reference pages |
|---|---|---|
| How does luma.gl combine application source with reusable shader code? | Shader Assembly | ShaderAssembler, ShaderModule, ShaderPlugin |
| How do I let optional features customize a base shader without copying it? | Writing Customizable Shaders | ShaderPlugin, ShaderAssembler |
| How do I keep one rendering feature available on WebGPU and WebGL 2? | Writing Portable Shaders | Model, WGSL Support |
| How do I run image effects or other fullscreen texture stages? | Shader Passes | ShaderPass, ShaderPassRenderer |
Related reference topics:
- Core Shader Types defines the
descriptors used by
ShaderModule.uniformTypes. - Shader Inputs explains the engine-side bridge from module props to uniform buffers and bindings.
- Bind Groups and Bindings explains named shader resources and logical bind groups.
For runnable examples, see the Shader Modules, Shader Hooks, Shader Plugins, and Lighting tutorials.