Skip to main content

Sheen

Sheen adds a soft grazing-angle response for fabric, velvet, and other surfaces with fine fibers.

GitHub
0.0s
Look along the edges of the spheres for the soft fabric highlight.

Configuration​

import {Model} from '@luma.gl/engine/api';
import {createPBRMaterial, type PBRMaterial} from '@luma.gl/engine/materials';

const material: PBRMaterial = createPBRMaterial(device, {
uniforms: {
sheenColorFactor: [0.5, 0.1, 0.2],
sheenRoughnessFactor: 0.7
}
});

// modelProps contains your existing shaders, geometry, and buffer layout.
const model = new Model(device, {
...modelProps,
material,
defines: {...modelProps.defines, USE_MATERIAL_EXTENSIONS: true}
});

Parameters​

ParameterDefaultDescription
sheenColorFactor[0, 0, 0]RGB contribution of the sheen layer.
sheenRoughnessFactor0Roughness of the sheen layer, in the range 0–1.
sheenColorMapEnabledfalseEnables sheen-color texture sampling.
sheenRoughnessMapEnabledfalseEnables sheen-roughness texture sampling.

Texture bindings​

FieldModel defineDescription
pbr_sheenColorSamplerHAS_SHEENCOLORMAP: trueTexture resource for the sheenColor slot.
pbr_sheenRoughnessSamplerHAS_SHEENROUGHNESSMAP: trueTexture resource for the sheenRoughness slot.

Enable USE_MATERIAL_EXTENSIONS on custom models. The glTF importer enables it automatically.

See Using PBR materials for material setup.

Remarks​

  • KHR_materials_sheen maps color, roughness, and their optional textures into the shared sheen lobe.