Skip to main content

pbrMaterial

Implements Physically Based Shading of a microfacet surface defined by a glTF material.

Lighting is expected to be defined by the lights module.

Bind Group Convention

The pbrMaterial module's material uniform buffer, textures, and samplers are currently assigned to bind group 3. The module also depends on lighting, which is assigned to bind group 2, while projection-style globals typically remain in group 0.

See the Bind Groups and Bindings Guide for details on how grouped bindings are declared and supplied.

References

Attribution

The GLSL and WGSL material shaders derive from the historical Khronos glTF-WebGL-PBR reference shader. The version incorporated into luma.gl was distributed under the MIT License with Copyright (c) 2016-2017 Mohamad Moneimne and Contributors. Both shaders preserve that upstream copyright alongside the vis.gl contributors' additions and remain MIT-licensed.

The upstream project has since been renamed glTF Sample Viewer, and its current releases use the Apache License 2.0. That later license does not replace the MIT terms attached to the historical version used here.