Skip to main content

Unlit surfaces

Unlit surfaces preserve their surface color without evaluating scene lighting, useful for signs, diagrams, and baked artwork.

GitHub
0.0s
The unlit surfaces retain their base color as you orbit the scene.

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​

ParameterDefaultDescription
unlitfalseBypasses 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.
baseColorMapEnabledfalseEnables base-color texture sampling.

Texture bindings​

FieldModel defineDescription
pbr_baseColorSamplerHAS_BASECOLORMAP: trueTexture resource for the baseColor slot.

See Using PBR materials for material setup.

Remarks​