MaterialKey

actual class MaterialKey

MaterialKey encodes glTF material properties for material selection and creation.

MaterialKey holds a set of boolean flags and texture coordinates that describe the properties of a glTF material. MaterialProvider uses this to determine which material to create or select. Key properties include texture presence, shading model, alpha mode, and advanced features like clearcoat and transmission.

See also

expect class MaterialKey

MaterialKey encodes glTF material properties for material selection and creation.

MaterialKey holds a set of boolean flags and texture coordinates that describe the properties of a glTF material. MaterialProvider uses this to determine which material to create or select. Key properties include texture presence, shading model, alpha mode, and advanced features like clearcoat and transmission.

See also

actual class MaterialKey

MaterialKey encodes glTF material properties for material selection and creation.

MaterialKey holds a set of boolean flags and texture coordinates that describe the properties of a glTF material. MaterialProvider uses this to determine which material to create or select. Key properties include texture presence, shading model, alpha mode, and advanced features like clearcoat and transmission.

See also

actual class MaterialKey

MaterialKey encodes glTF material properties for material selection and creation.

MaterialKey holds a set of boolean flags and texture coordinates that describe the properties of a glTF material. MaterialProvider uses this to determine which material to create or select. Key properties include texture presence, shading model, alpha mode, and advanced features like clearcoat and transmission.

See also

actual class MaterialKey

MaterialKey encodes glTF material properties for material selection and creation.

MaterialKey holds a set of boolean flags and texture coordinates that describe the properties of a glTF material. MaterialProvider uses this to determine which material to create or select. Key properties include texture presence, shading model, alpha mode, and advanced features like clearcoat and transmission.

See also

Constructors

Link copied to clipboard
actual constructor()

Create a new MaterialKey with default values.

expect constructor()

Create a new MaterialKey with default values.

actual constructor()
actual constructor()
actual constructor()

Create a new MaterialKey with default values.

Properties

Link copied to clipboard
actual var alphaMode: Int

Alpha mode: 0 = OPAQUE, 1 = MASK (alpha cutoff), 2 = BLEND.

expect var alphaMode: Int

Alpha mode: 0 = OPAQUE, 1 = MASK (alpha cutoff), 2 = BLEND.

actual var alphaMode: Int

Alpha mode: 0 = OPAQUE, 1 = MASK (alpha cutoff), 2 = BLEND.

actual var alphaMode: Int

Alpha mode: 0 = OPAQUE, 1 = MASK (alpha cutoff), 2 = BLEND.

actual var alphaMode: Int

Alpha mode: 0 = OPAQUE, 1 = MASK (alpha cutoff), 2 = BLEND.

Link copied to clipboard
actual var aoUV: Int

glTF texcoord set index for the ambient-occlusion texture.

expect var aoUV: Int

glTF texcoord set index for the ambient-occlusion texture.

actual var aoUV: Int

glTF texcoord set index for the ambient-occlusion texture.

actual var aoUV: Int

glTF texcoord set index for the ambient-occlusion texture.

actual var aoUV: Int

glTF texcoord set index for the ambient-occlusion texture.

Link copied to clipboard
actual var baseColorUV: Int

glTF texcoord set index for the base color texture.

expect var baseColorUV: Int

glTF texcoord set index for the base color texture.

actual var baseColorUV: Int

glTF texcoord set index for the base color texture.

actual var baseColorUV: Int

glTF texcoord set index for the base color texture.

actual var baseColorUV: Int

glTF texcoord set index for the base color texture.

Link copied to clipboard

glTF texcoord set index for the clearcoat normal map.

glTF texcoord set index for the clearcoat normal map.

glTF texcoord set index for the clearcoat normal map.

glTF texcoord set index for the clearcoat normal map.

glTF texcoord set index for the clearcoat normal map.

Link copied to clipboard

glTF texcoord set index for the clearcoat roughness texture.

glTF texcoord set index for the clearcoat roughness texture.

glTF texcoord set index for the clearcoat roughness texture.

glTF texcoord set index for the clearcoat roughness texture.

glTF texcoord set index for the clearcoat roughness texture.

Link copied to clipboard
actual var clearCoatUV: Int

glTF texcoord set index for the clearcoat texture.

expect var clearCoatUV: Int

glTF texcoord set index for the clearcoat texture.

actual var clearCoatUV: Int

glTF texcoord set index for the clearcoat texture.

actual var clearCoatUV: Int

glTF texcoord set index for the clearcoat texture.

actual var clearCoatUV: Int

glTF texcoord set index for the clearcoat texture.

Link copied to clipboard
actual var doubleSided: Boolean

Renders both faces of each triangle (glTF doubleSided).

expect var doubleSided: Boolean

Renders both faces of each triangle (glTF doubleSided).

actual var doubleSided: Boolean

Renders both faces of each triangle (glTF doubleSided).

actual var doubleSided: Boolean

Renders both faces of each triangle (glTF doubleSided).

actual var doubleSided: Boolean

Renders both faces of each triangle (glTF doubleSided).

Link copied to clipboard
actual var emissiveUV: Int

glTF texcoord set index for the emissive texture.

expect var emissiveUV: Int

glTF texcoord set index for the emissive texture.

actual var emissiveUV: Int

glTF texcoord set index for the emissive texture.

actual var emissiveUV: Int

glTF texcoord set index for the emissive texture.

actual var emissiveUV: Int

glTF texcoord set index for the emissive texture.

Link copied to clipboard

Enables shader diagnostics (visualizes the material as a debug aid).

Enables shader diagnostics (visualizes the material as a debug aid).

Enables shader diagnostics (visualizes the material as a debug aid).

Enables shader diagnostics (visualizes the material as a debug aid).

Enables shader diagnostics (visualizes the material as a debug aid).

Link copied to clipboard

A base color texture is bound.

A base color texture is bound.

A base color texture is bound.

A base color texture is bound.

A base color texture is bound.

Link copied to clipboard
actual var hasClearCoat: Boolean

The clearcoat layer is enabled (KHR_materials_clearcoat).

expect var hasClearCoat: Boolean

The clearcoat layer is enabled (KHR_materials_clearcoat).

actual var hasClearCoat: Boolean

The clearcoat layer is enabled (KHR_materials_clearcoat).

actual var hasClearCoat: Boolean

The clearcoat layer is enabled (KHR_materials_clearcoat).

actual var hasClearCoat: Boolean

The clearcoat layer is enabled (KHR_materials_clearcoat).

Link copied to clipboard

A clearcoat normal map is bound.

A clearcoat normal map is bound.

A clearcoat normal map is bound.

A clearcoat normal map is bound.

A clearcoat normal map is bound.

Link copied to clipboard

A clearcoat roughness texture is bound.

A clearcoat roughness texture is bound.

A clearcoat roughness texture is bound.

A clearcoat roughness texture is bound.

A clearcoat roughness texture is bound.

Link copied to clipboard

A clearcoat intensity texture is bound.

A clearcoat intensity texture is bound.

A clearcoat intensity texture is bound.

A clearcoat intensity texture is bound.

A clearcoat intensity texture is bound.

Link copied to clipboard

An emissive texture is bound.

An emissive texture is bound.

An emissive texture is bound.

An emissive texture is bound.

An emissive texture is bound.

Link copied to clipboard
actual var hasIOR: Boolean

A custom index of refraction is set (KHR_materials_ior).

expect var hasIOR: Boolean

A custom index of refraction is set (KHR_materials_ior).

actual var hasIOR: Boolean

A custom index of refraction is set (KHR_materials_ior).

actual var hasIOR: Boolean

A custom index of refraction is set (KHR_materials_ior).

actual var hasIOR: Boolean

A custom index of refraction is set (KHR_materials_ior).

Link copied to clipboard

A metallic-roughness texture is bound (specular-glossiness texture when useSpecularGlossiness).

A metallic-roughness texture is bound (specular-glossiness texture when useSpecularGlossiness).

A metallic-roughness texture is bound (specular-glossiness texture when useSpecularGlossiness).

A metallic-roughness texture is bound (specular-glossiness texture when useSpecularGlossiness).

A metallic-roughness texture is bound (specular-glossiness texture when useSpecularGlossiness).

Link copied to clipboard

A tangent-space normal map is bound.

A tangent-space normal map is bound.

A tangent-space normal map is bound.

A tangent-space normal map is bound.

A tangent-space normal map is bound.

Link copied to clipboard

An ambient-occlusion texture is bound.

An ambient-occlusion texture is bound.

An ambient-occlusion texture is bound.

An ambient-occlusion texture is bound.

An ambient-occlusion texture is bound.

Link copied to clipboard
actual var hasSheen: Boolean

The sheen layer is enabled (KHR_materials_sheen).

expect var hasSheen: Boolean

The sheen layer is enabled (KHR_materials_sheen).

actual var hasSheen: Boolean

The sheen layer is enabled (KHR_materials_sheen).

actual var hasSheen: Boolean

The sheen layer is enabled (KHR_materials_sheen).

actual var hasSheen: Boolean

The sheen layer is enabled (KHR_materials_sheen).

Link copied to clipboard

A sheen color texture is bound.

A sheen color texture is bound.

A sheen color texture is bound.

A sheen color texture is bound.

A sheen color texture is bound.

Link copied to clipboard

A sheen roughness texture is bound.

A sheen roughness texture is bound.

A sheen roughness texture is bound.

A sheen roughness texture is bound.

A sheen roughness texture is bound.

Link copied to clipboard

One or more textures use KHR_texture_transform.

One or more textures use KHR_texture_transform.

One or more textures use KHR_texture_transform.

One or more textures use KHR_texture_transform.

One or more textures use KHR_texture_transform.

Link copied to clipboard

Transmission is enabled (KHR_materials_transmission).

Transmission is enabled (KHR_materials_transmission).

Transmission is enabled (KHR_materials_transmission).

Transmission is enabled (KHR_materials_transmission).

Transmission is enabled (KHR_materials_transmission).

Link copied to clipboard

A transmission texture is bound.

A transmission texture is bound.

A transmission texture is bound.

A transmission texture is bound.

A transmission texture is bound.

Link copied to clipboard

The mesh provides per-vertex COLOR_0 data to be multiplied into base color.

The mesh provides per-vertex COLOR_0 data to be multiplied into base color.

The mesh provides per-vertex COLOR_0 data to be multiplied into base color.

The mesh provides per-vertex COLOR_0 data to be multiplied into base color.

The mesh provides per-vertex COLOR_0 data to be multiplied into base color.

Link copied to clipboard

A volume thickness texture is bound (KHR_materials_volume).

A volume thickness texture is bound (KHR_materials_volume).

A volume thickness texture is bound (KHR_materials_volume).

A volume thickness texture is bound (KHR_materials_volume).

A volume thickness texture is bound (KHR_materials_volume).

Link copied to clipboard

glTF texcoord set index for the metallic-roughness texture.

glTF texcoord set index for the metallic-roughness texture.

glTF texcoord set index for the metallic-roughness texture.

glTF texcoord set index for the metallic-roughness texture.

glTF texcoord set index for the metallic-roughness texture.

Link copied to clipboard
actual var normalUV: Int

glTF texcoord set index for the normal map.

expect var normalUV: Int

glTF texcoord set index for the normal map.

actual var normalUV: Int

glTF texcoord set index for the normal map.

actual var normalUV: Int

glTF texcoord set index for the normal map.

actual var normalUV: Int

glTF texcoord set index for the normal map.

Link copied to clipboard
actual var sheenColorUV: Int

glTF texcoord set index for the sheen color texture.

expect var sheenColorUV: Int

glTF texcoord set index for the sheen color texture.

actual var sheenColorUV: Int

glTF texcoord set index for the sheen color texture.

actual var sheenColorUV: Int

glTF texcoord set index for the sheen color texture.

actual var sheenColorUV: Int

glTF texcoord set index for the sheen color texture.

Link copied to clipboard
actual var sheenRoughnessUV: Int

glTF texcoord set index for the sheen roughness texture.

expect var sheenRoughnessUV: Int

glTF texcoord set index for the sheen roughness texture.

actual var sheenRoughnessUV: Int

glTF texcoord set index for the sheen roughness texture.

actual var sheenRoughnessUV: Int

glTF texcoord set index for the sheen roughness texture.

actual var sheenRoughnessUV: Int

glTF texcoord set index for the sheen roughness texture.

Link copied to clipboard
actual var transmissionUV: Int

glTF texcoord set index for the transmission texture.

expect var transmissionUV: Int

glTF texcoord set index for the transmission texture.

actual var transmissionUV: Int

glTF texcoord set index for the transmission texture.

actual var transmissionUV: Int

glTF texcoord set index for the transmission texture.

actual var transmissionUV: Int

glTF texcoord set index for the transmission texture.

Link copied to clipboard
actual var unlit: Boolean

Uses the unlit shading model (KHR_materials_unlit).

expect var unlit: Boolean

Uses the unlit shading model (KHR_materials_unlit).

actual var unlit: Boolean

Uses the unlit shading model (KHR_materials_unlit).

actual var unlit: Boolean

Uses the unlit shading model (KHR_materials_unlit).

actual var unlit: Boolean

Uses the unlit shading model (KHR_materials_unlit).

Link copied to clipboard

Uses the legacy specular-glossiness workflow (KHR_materials_pbrSpecularGlossiness).

Uses the legacy specular-glossiness workflow (KHR_materials_pbrSpecularGlossiness).

Uses the legacy specular-glossiness workflow (KHR_materials_pbrSpecularGlossiness).

Uses the legacy specular-glossiness workflow (KHR_materials_pbrSpecularGlossiness).

Uses the legacy specular-glossiness workflow (KHR_materials_pbrSpecularGlossiness).

Link copied to clipboard

glTF texcoord set index for the volume thickness texture.

glTF texcoord set index for the volume thickness texture.

glTF texcoord set index for the volume thickness texture.

glTF texcoord set index for the volume thickness texture.

glTF texcoord set index for the volume thickness texture.

Functions

Link copied to clipboard
actual fun constrainMaterial(uvmap: IntArray)

Mutates this key to trim requested features down to what the provider supports, and fills uvmap with the resulting glTF-texcoord → Filament-UV-set mapping. Called by providers before material creation.

expect fun constrainMaterial(uvmap: IntArray)

Mutates this key to trim requested features down to what the provider supports, and fills uvmap with the resulting glTF-texcoord → Filament-UV-set mapping. Called by providers before material creation.

actual fun constrainMaterial(uvmap: IntArray)

Mutates this key to trim requested features down to what the provider supports, and fills uvmap with the resulting glTF-texcoord → Filament-UV-set mapping. Called by providers before material creation.

actual fun constrainMaterial(uvmap: IntArray)

Mutates this key to trim requested features down to what the provider supports, and fills uvmap with the resulting glTF-texcoord → Filament-UV-set mapping. Called by providers before material creation.

actual fun constrainMaterial(uvmap: IntArray)

Mutates this key to trim requested features down to what the provider supports, and fills uvmap with the resulting glTF-texcoord → Filament-UV-set mapping. Called by providers before material creation.