Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PBRSheenConfiguration

Define the code related to the Sheen parameters of the pbr material.

Hierarchy

  • PBRSheenConfiguration

Index

Constructors

constructor

  • Instantiate a new istance of clear coat configuration.

    Parameters

    • markAllSubMeshesAsTexturesDirty: () => void

      Callback to flag the material to dirty

        • (): void
        • Returns void

    Returns PBRSheenConfiguration

Properties

albedoScalingSearch playground for albedoScaling

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

colorSearch playground for color

color: Color3

Defines the sheen color.

intensitySearch playground for intensity

intensity: number

Defines the sheen intensity.

isEnabledSearch playground for isEnabled

isEnabled: boolean

Defines if the material uses sheen.

linkSheenWithAlbedoSearch playground for linkSheenWithAlbedo

linkSheenWithAlbedo: boolean

Defines if the sheen is linked to the sheen color.

roughnessSearch playground for roughness

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

textureSearch playground for texture

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

textureRoughnessSearch playground for textureRoughness

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

useRoughnessFromMainTextureSearch playground for useRoughnessFromMainTexture

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

Methods

bindForSubMeshSearch playground for bindForSubMesh

  • Binds the material data.

    Parameters

    • uniformBuffer: UniformBuffer

      defines the Uniform buffer to fill in.

    • scene: Scene

      defines the scene the material belongs to.

    • isFrozen: boolean

      defines wether the material is frozen or not.

    • Optional subMesh: SubMesh

      the submesh to bind data for

    Returns void

copyToSearch playground for copyTo

  • Makes a duplicate of the current configuration into another one.

    Parameters

    Returns void

disposeSearch playground for dispose

  • dispose(forceDisposeTextures?: boolean): void
  • Disposes the resources of the material.

    Parameters

    • Optional forceDisposeTextures: boolean

      Forces the disposal of all textures.

    Returns void

getActiveTexturesSearch playground for getActiveTextures

  • getActiveTextures(activeTextures: BaseTexture[]): void
  • Returns an array of the actively used textures.

    Parameters

    Returns void

getAnimatablesSearch playground for getAnimatables

  • Returns the animatable textures.

    Parameters

    • animatables: IAnimatable[]

      Array of animatable textures.

    Returns void

getClassNameSearch playground for getClassName

  • getClassName(): string
  • Get the current class name of the texture useful for serialization or dynamic coding.

    Returns string

    "PBRSheenConfiguration"

hasTextureSearch playground for hasTexture

  • Checks to see if a texture is used in the material.

    Parameters

    Returns boolean

    • Boolean specifying if a texture is used in the material.

isReadyForSubMeshSearch playground for isReadyForSubMesh

  • isReadyForSubMesh(defines: IMaterialSheenDefines, scene: Scene): boolean
  • Specifies that the submesh is ready to be used.

    Parameters

    • defines: IMaterialSheenDefines

      the list of "defines" to update.

    • scene: Scene

      defines the scene the material belongs to.

    Returns boolean

    • boolean indicating that the submesh is ready or not.

parseSearch playground for parse

  • parse(source: any, scene: Scene, rootUrl: string): void
  • Parses a anisotropy Configuration from a serialized object.

    Parameters

    • source: any

      Serialized object.

    • scene: Scene

      Defines the scene we are parsing for

    • rootUrl: string

      Defines the rootUrl to load from

    Returns void

prepareDefinesSearch playground for prepareDefines

  • prepareDefines(defines: IMaterialSheenDefines, scene: Scene): void
  • Checks to see if a texture is used in the material.

    Parameters

    • defines: IMaterialSheenDefines

      the list of "defines" to update.

    • scene: Scene

      defines the scene the material belongs to.

    Returns void

serializeSearch playground for serialize

  • serialize(): any
  • Serializes this BRDF configuration.

    Returns any

    • An object with the serialized config.

Static AddFallbacksSearch playground for AddFallbacks

  • AddFallbacks(defines: IMaterialSheenDefines, fallbacks: EffectFallbacks, currentRank: number): number
  • Add fallbacks to the effect fallbacks list.

    Parameters

    • defines: IMaterialSheenDefines

      defines the Base texture to use.

    • fallbacks: EffectFallbacks

      defines the current fallback list.

    • currentRank: number

      defines the current fallback rank.

    Returns number

    the new fallback rank.

Static AddSamplersSearch playground for AddSamplers

  • AddSamplers(samplers: string[]): void
  • Add the required samplers to the current list.

    Parameters

    • samplers: string[]

      defines the current sampler list.

    Returns void

Static AddUniformsSearch playground for AddUniforms

  • AddUniforms(uniforms: string[]): void
  • Add the required uniforms to the current list.

    Parameters

    • uniforms: string[]

      defines the current uniform list.

    Returns void

Static PrepareUniformBufferSearch playground for PrepareUniformBuffer

  • Add the required uniforms to the current buffer.

    Parameters

    • uniformBuffer: UniformBuffer

      defines the current uniform buffer.

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method