Creates a new Unlit property for use on a Material.
Disables and removes the extension from the Document.
Indicates to the client whether it is OK to load the asset when this extension is not recognized. Optional extensions are generally preferred, if there is not a good reason to require a client to completely fail when an extension isn't known.
Lists all ExtensionProperty instances associated with, or created by, this extension. Includes only instances that are attached to the Document's graph; detached instances will be excluded.
Indicates to the client whether it is OK to load the asset when this extension is not recognized. Optional extensions are generally preferred, if there is not a good reason to require a client to completely fail when an extension isn't known.
Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.
KHR_materials_unlit
defines an unlit shading model for use in glTF 2.0 materials.Unlit (also "Shadeless" or "Constant") materials provide a simple alternative to the Physically Based Rendering (PBR) shading models provided by the core specification. Unlit materials are often useful for cheaper rendering on performance-contrained devices, e.g. mobile phones. Additionally, unlit materials can be very useful in achieving stylized, non-photo-realistic effects like hand painted illustrative styles or baked toon shaders.
Properties:
Example
The
KHRMaterialsUnlit
class provides a single ExtensionProperty type,Unlit
, which may be attached to any Material instance. For example:import { KHRMaterialsUnlit, Unlit } from '@gltf-transform/extensions'; // Create an Extension attached to the Document. const unlitExtension = document.createExtension(KHRMaterialsUnlit); // Create an Unlit property. const unlit = unlitExtension.createUnlit(); // Attach the property to a Material. material.setExtension('KHR_materials_unlit', unlit);