KHRMaterialsDispersion

KHR_materials_dispersion defines dispersion on a glTF PBR material.

illustration

Figure: Prisms demonstrating volumetric refraction and dispersion, for varying values of dispersion and IOR. Source: Khronos Group, rendered in Adobe Stager.

Dispersion enables configuring the strength of the angular separation of colors (chromatic aberration) transmitting through a relatively clear volume. It is an enhancement to the default KHR_materials_volume transmission model which assumes no dispersion.

Properties:

Example

import { KHRMaterialsDispersion, Dispersion } from '@gltf-transform/extensions';

// Create an Extension attached to the Document.
const dispersionExtension = document.createExtension(KHRMaterialsDispersion);

// Create Dispersion property.
const dispersion = dispersionExtension.createDispersion().setDispersion(1.0);

// Assign to a Material.
material.setExtension('KHR_materials_dispersion', dispersion);

Hierarchy

Static properties

EXTENSION_NAME: "KHR_materials_dispersion"

Properties

extensionName: "KHR_materials_dispersion"
prereadTypes: import("/Users/donmccurdy/Documents/Projects/glTF-Transform/packages/core/src/constants").PropertyType[]
prewriteTypes: import("/Users/donmccurdy/Documents/Projects/glTF-Transform/packages/core/src/constants").PropertyType[]

Methods

  • dispose(): void
  • isRequired(): boolean
  • 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.

  • listProperties(): ExtensionProperty[]
  • 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.

Function symbol, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy. Documentation built with greendoc and published under Creative Commons Attribution 3.0.