Unlit surfaces
Unlit surfaces preserve their surface color without evaluating scene lighting, useful for signs, diagrams, and baked artwork.
Always-unlit shaders​
For raster imagery and custom shaders that never need lighting, use
unlitMaterial from
@luma.gl/shaders. It preserves RGBA without lighting dependencies or material
uniforms. Texture sampling remains application-owned. The existing PBR unlit path
below retains its material schema and texture processing for imported assets.
Configuration​
import {createPBRMaterial, type PBRMaterial} from '@luma.gl/engine/materials';
const material: PBRMaterial = createPBRMaterial(device, {
uniforms: {
unlit: true,
baseColorFactor: [0.2, 0.6, 1, 1]
}
});
// Pass material to a compatible Model through its material prop.
Parameters​
| Parameter | Default | Description |
|---|---|---|
unlit | false | Bypasses the lighting response while retaining the material surface color. |
baseColorFactor | [1, 1, 1, 1] | RGBA base color multiplied by the base-color texture when enabled. |
baseColorMapEnabled | false | Enables base-color texture sampling. |
Texture bindings​
| Field | Model define | Description |
|---|---|---|
pbr_baseColorSampler | HAS_BASECOLORMAP: true | Texture resource for the baseColor slot. |
See Using PBR materials for material setup.
Remarks​
KHR_materials_unlitselects unlit shading on imported materials.