Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PBRClearCoatConfiguration

Define the code related to the clear coat parameters of the pbr material.

Hierarchy

  • PBRClearCoatConfiguration

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 PBRClearCoatConfiguration

Properties

bumpTextureSearch playground for bumpTexture

bumpTexture: Nullable<BaseTexture>

Define the clear coat specific bump texture.

indexOfRefractionSearch playground for indexOfRefraction

indexOfRefraction: number

Defines the index of refraction of the clear coat. This defaults to 1.5 corresponding to a 0.04 f0 or a 4% reflectance at normal incidence The default fits with a polyurethane material. Changing the default value is more performance intensive.

intensitySearch playground for intensity

intensity: number

Defines the clear coat layer strength (between 0 and 1) it defaults to 1.

isEnabledSearch playground for isEnabled

isEnabled: boolean

Defines if the clear coat is enabled in the material.

isTintEnabledSearch playground for isTintEnabled

isTintEnabled: boolean

Defines if the clear coat tint is enabled in the material.

remapF0OnInterfaceChangeSearch playground for remapF0OnInterfaceChange

remapF0OnInterfaceChange: boolean

Defines if the F0 value should be remapped to account for the interface change in the material.

roughnessSearch playground for roughness

roughness: number

Defines the clear coat layer roughness.

textureSearch playground for texture

Stores the clear coat values in a texture (red channel is intensity and green channel is roughness) If useRoughnessFromMainTexture is false, the green channel of texture is not used and the green channel of textureRoughness is used instead if textureRoughness is not empty, else no texture roughness is used

textureRoughnessSearch playground for textureRoughness

textureRoughness: Nullable<BaseTexture>

Stores the clear coat roughness in a texture (green channel) Not used if useRoughnessFromMainTexture is true

tintColorSearch playground for tintColor

tintColor: Color3

Defines the clear coat tint of the material. This is only use if tint is enabled

tintColorAtDistanceSearch playground for tintColorAtDistance

tintColorAtDistance: number

Defines the distance at which the tint color should be found in the clear coat media. This is only use if tint is enabled

tintTextureSearch playground for tintTexture

tintTexture: Nullable<BaseTexture>

Stores the clear tint values in a texture. rgb is tint a is a thickness factor

tintThicknessSearch playground for tintThickness

tintThickness: number

Defines the clear coat layer thickness. This is only use if tint is enabled

useRoughnessFromMainTextureSearch playground for useRoughnessFromMainTexture

useRoughnessFromMainTexture: boolean

Indicates that the green channel of the texture property will be used for roughness (default: true) If false, the green channel from textureRoughness is used for roughness

Methods

bindForSubMeshSearch playground for bindForSubMesh

  • bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: Engine, disableBumpMap: boolean, isFrozen: boolean, invertNormalMapX: boolean, invertNormalMapY: boolean, subMesh?: SubMesh): void
  • Binds the material data.

    Parameters

    • uniformBuffer: UniformBuffer

      defines the Uniform buffer to fill in.

    • scene: Scene

      defines the scene the material belongs to.

    • engine: Engine

      defines the engine the material belongs to.

    • disableBumpMap: boolean

      defines wether the material disables bump or not.

    • isFrozen: boolean

      defines wether the material is frozen or not.

    • invertNormalMapX: boolean

      If sets to true, x component of normal map value will be inverted (x = 1.0 - x).

    • invertNormalMapY: boolean

      If sets to true, y component of normal map value will be inverted (y = 1.0 - y).

    • 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

    "PBRClearCoatConfiguration"

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: IMaterialClearCoatDefines, scene: Scene, engine: Engine, disableBumpMap: boolean): boolean
  • Gets wehter the submesh is ready to be used or not.

    Parameters

    • defines: IMaterialClearCoatDefines

      the list of "defines" to update.

    • scene: Scene

      defines the scene the material belongs to.

    • engine: Engine

      defines the engine the material belongs to.

    • disableBumpMap: boolean

      defines wether the material disables bump or not.

    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: IMaterialClearCoatDefines, scene: Scene): void
  • Checks to see if a texture is used in the material.

    Parameters

    • defines: IMaterialClearCoatDefines

      the list of "defines" to update.

    • scene: Scene

      defines the scene to the material belongs to.

    Returns void

serializeSearch playground for serialize

  • serialize(): any
  • Serializes this clear coat configuration.

    Returns any

    • An object with the serialized config.

Static AddFallbacksSearch playground for AddFallbacks

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

    Parameters

    • defines: IMaterialClearCoatDefines

      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