GltfMaterial Class

Definition

C++
public ref class GltfMaterial : Microsoft::MixedReality::Toolkit::Utilities::Gltf::Schema::GltfChildOfRootProperty
Inheritance
Attributes

Constructors

Fields

alphaCutoff

Specifies the cutoff threshold when in MASK mode. If the alpha value is greater than or equal to this value then it is rendered as fully opaque, otherwise, it is rendered as fully transparent. This value is ignored for other modes.

alphaMode

The material's alpha rendering mode enumeration specifying the interpretation of the alpha value of the main factor and texture. In OPAQUE mode, the alpha value is ignored and the rendered output is fully opaque. In MASK mode, the rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value. In BLEND mode, the alpha value is used to composite the source and destination areas. The rendered output is combined with the background using the normal painting operation (i.e. the Porter and Duff over operator).

commonConstant

A set of parameter values used to light flat-shaded materials

doubleSided

Specifies whether the material is double sided. When this value is false, back-face culling is enabled. When this value is true, back-face culling is disabled and double sided lighting is enabled. The back-face must have its normals reversed before the lighting equation is evaluated.

emissiveFactor

The RGB components of the emissive color of the material. If an emissiveTexture is specified, this value is multiplied with the texel values. 0.01.033

emissiveTexture

The emissive map controls the color and intensity of the light being emitted by the material. This texture contains RGB components in sRGB color space. If a fourth component (A) is present, it is ignored.

Extensions

https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/schema/extension.schema.json

(Inherited from GltfProperty)
Extras

https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/schema/extras.schema.json

(Inherited from GltfProperty)
name

The user-defined name of this object. This is not necessarily unique, e.g., an accessor and a buffer could have the same name, or two accessors could even have the same name.

(Inherited from GltfChildOfRootProperty)
normalTexture

A tangent space normal map. Each texel represents the XYZ components of a normal vector in tangent space.

occlusionTexture

The occlusion map is a greyscale texture, with white indicating areas that should receive full indirect lighting and black indicating no indirect lighting.

pbrMetallicRoughness

A set of parameter values that are used to define the metallic-roughness material model from Physically-Based Rendering (PBR) methodology.

Properties

Material

Unity Material wrapper for the GltfMaterial

Applies to

Product Versions
MRTK2 Unity 2018 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0
MRTK2 Unity 2019 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0
MRTK2 Unity 2020 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0