API

Class PBRSheenConfiguration

Plugin that implements the sheen component of the PBR material.

Hierarchy (View Summary)

Index
color: Color3 = ...

Defines the sheen color.

doNotSerialize: boolean = false

Specifies if the material plugin should be serialized, true to skip serialization

intensity: number = 1

Defines the sheen intensity.

markAllDefinesAsDirty: () => void

Helper function to mark defines as being dirty.

name: string

Defines the name of the plugin

priority: number = 500

Defines the priority of the plugin. Lower numbers run first.

registerForExtraEvents: boolean = false

Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)

resolveIncludes: boolean = false

Indicates that any #include directive in the plugin code must be replaced by the corresponding code.

albedoScaling: boolean

If true, the sheen effect is layered above the base BRDF with the albedo-scaling technique. It allows the strength of the sheen effect to not depend on the base color of the material, making it easier to setup and tweak the effect

isEnabled: boolean

Defines if the material uses sheen.

linkSheenWithAlbedo: boolean

Defines if the sheen is linked to the sheen color.

roughness: Nullable<number>

Defines the sheen roughness. It is not taken into account if linkSheenWithAlbedo is true. To stay backward compatible, material roughness is used instead if sheen roughness = null

Stores the sheen tint values in a texture. rgb is tint a is a intensity or roughness if the roughness property has been defined and useRoughnessFromTexture is true (in that case, textureRoughness won't be used) If the roughness property has been defined and useRoughnessFromTexture is false then the alpha channel is not used to modulate roughness

textureRoughness: Nullable<BaseTexture>

Stores the sheen roughness in a texture. alpha channel is the roughness. This texture won't be used if the texture property is not empty and useRoughnessFromTexture is true

useRoughnessFromMainTexture: boolean

Indicates that the alpha channel of the texture property will be used for roughness. Has no effect if the roughness (and texture!) property is not defined

  • Returns a list of custom shader code fragments to customize the shader.

    Parameters

    • _shaderType: string

      "vertex" or "fragment"

    • _shaderLanguage: ShaderLanguage = ShaderLanguage.GLSL

      The shader language to use.

    Returns Nullable<{ [pointName: string]: string }>

    null if no code to be added, or a list of pointName => code. Note that pointName can also be a regular expression if it starts with a !. In that case, the string found by the regular expression (if any) will be replaced by the code provided.

  • Gets the description of the uniforms to add to the ubo (if engine supports ubos) or to inject directly in the vertex/fragment shaders (if engine does not support ubos)

    Returns {
        fragment?: string;
        ubo?: { name: string; size: number; type: string }[];
        vertex?: string;
    }

    the description of the uniforms