PBRMetallicRoughness

@Serializable
data class PBRMetallicRoughness(var name: String? = null, val baseColorFactor: FloatArray? = null, val baseColorTexture: GLTF2.Material.TextureInfo? = null, val metallicFactor: Float? = null, val roughnessFactor: Float? = null, val metallicRoughnessTexture: GLTF2.Material.TextureInfo? = null, val extensions: JsonElement? = null, val extras: JsonElement? = null) : GLTFProperty

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

https://github.com/KhronosGroup/glTF/blob/main/specification/2.0/schema/material.pbrMetallicRoughness.schema.json

Constructors

Link copied to clipboard
constructor(name: String? = null, baseColorFactor: FloatArray? = null, baseColorTexture: GLTF2.Material.TextureInfo? = null, metallicFactor: Float? = null, roughnessFactor: Float? = null, metallicRoughnessTexture: GLTF2.Material.TextureInfo? = null, extensions: JsonElement? = null, extras: JsonElement? = null)

Properties

Link copied to clipboard

The factors for the base color of the material. This value defines linear multipliers for the sampled texels of the base color texture.

Link copied to clipboard

The base color texture. The first three components (RGB) MUST be encoded with the sRGB transfer function. They specify the base color of the material. If the fourth component (A) is present, it represents the linear alpha coverage of the material. Otherwise, the alpha coverage is equal to 1.0. The material.alphaMode property specifies how alpha is interpreted. The stored texels MUST NOT be premultiplied. When undefined, the texture MUST be sampled as having 1.0 in all components.

Link copied to clipboard
open override val extensions: JsonElement? = null

JSON object with extension-specific objects.

Link copied to clipboard
open override val extras: JsonElement? = null

Although extras MAY have any type, it is common for applications to store and access custom data as key/value pairs. Therefore, extras SHOULD be a JSON object rather than a primitive value for best portability.

Link copied to clipboard
val metallicFactor: Float? = null

The factor for the metalness of the material. This value defines a linear multiplier for the sampled metalness values of the metallic-roughness texture.

Link copied to clipboard

The metallic-roughness texture. The metalness values are sampled from the B channel. The roughness values are sampled from the G channel. These values MUST be encoded with a linear transfer function. If other channels are present (R or A), they MUST be ignored for metallic-roughness calculations. When undefined, the texture MUST be sampled as having 1.0 in G and B components.

Link copied to clipboard
open override var name: String?
Link copied to clipboard
val roughnessFactor: Float? = null

The factor for the roughness of the material. This value defines a linear multiplier for the sampled roughness values of the metallic-roughness texture.