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.
For an introduction to modules, plugins, injection targets, injections, and their ownership boundaries, start with the Shaders module overview.
| 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? | Shader Injection | ShaderPlugin, ShaderAssembler |
| How do I keep one rendering feature available on WebGPU and WebGL 2? | Writing Portable Shaders | Model, WGSL Support |
How do I preserve more than f32 precision across WebGPU and WebGL 2? | GPU Floating-Point Precision Techniques | fp64, fp64arithmetic |
| 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 Injection, Shader Plugins, and Lighting tutorials.