Sheen
Sheen adds a soft grazing-angle response for fabric, velvet, and other surfaces with fine fibers.
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​
| Parameter | Default | Description |
|---|---|---|
sheenColorFactor | [0, 0, 0] | RGB contribution of the sheen layer. |
sheenRoughnessFactor | 0 | Roughness of the sheen layer, in the range 0–1. |
sheenColorMapEnabled | false | Enables sheen-color texture sampling. |
sheenRoughnessMapEnabled | false | Enables sheen-roughness texture sampling. |
Texture bindings​
| Field | Model define | Description |
|---|---|---|
pbr_sheenColorSampler | HAS_SHEENCOLORMAP: true | Texture resource for the sheenColor slot. |
pbr_sheenRoughnessSampler | HAS_SHEENROUGHNESSMAP: true | Texture 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_sheenmaps color, roughness, and their optional textures into the shared sheen lobe.