Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PBRBRDFConfiguration

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

Hierarchy

  • PBRBRDFConfiguration

Index

Constructors

constructor

  • Instantiate a new istance of clear coat configuration.

    Parameters

    • markAllSubMeshesAsMiscDirty: () => void

      Callback to flag the material to dirty

        • (): void
        • Returns void

    Returns PBRBRDFConfiguration

Properties

useEnergyConservationSearch playground for useEnergyConservation

useEnergyConservation: boolean

Defines if the material uses energy conservation.

useSmithVisibilityHeightCorrelatedSearch playground for useSmithVisibilityHeightCorrelated

useSmithVisibilityHeightCorrelated: boolean

LEGACY Mode set to false Defines if the material uses height smith correlated visibility term. If you intent to not use our default BRDF, you need to load a separate BRDF Texture for the PBR You can either load https://assets.babylonjs.com/environments/uncorrelatedBRDF.png or https://assets.babylonjs.com/environments/uncorrelatedBRDF.dds to have more precision Not relying on height correlated will also disable energy conservation.

useSpecularGlossinessInputEnergyConservationSearch playground for useSpecularGlossinessInputEnergyConservation

useSpecularGlossinessInputEnergyConservation: boolean

Defines if the material uses energy conservation, when the specular workflow is active. If activated, the albedo color is multiplied with (1. - maxChannel(specular color)). If deactivated, a material is only physically plausible, when (albedo color + specular color) < 1. In the deactivated case, the material author has to ensure energy conservation, for a physically plausible rendering.

useSphericalHarmonicsSearch playground for useSphericalHarmonics

useSphericalHarmonics: boolean

LEGACY Mode set to false Defines if the material uses spherical harmonics vs spherical polynomials for the diffuse part of the IBL. The harmonics despite a tiny bigger cost has been proven to provide closer results to the ground truth.

Static DEFAULT_USE_ENERGY_CONSERVATIONSearch playground for DEFAULT_USE_ENERGY_CONSERVATION

DEFAULT_USE_ENERGY_CONSERVATION: boolean

Default value used for the energy conservation. This should only be changed to adapt to the type of texture in scene.environmentBRDFTexture.

Static DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATEDSearch playground for DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED

DEFAULT_USE_SMITH_VISIBILITY_HEIGHT_CORRELATED: boolean

Default value used for the Smith Visibility Height Correlated mode. This should only be changed to adapt to the type of texture in scene.environmentBRDFTexture.

Static DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATIONSearch playground for DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION

DEFAULT_USE_SPECULAR_GLOSSINESS_INPUT_ENERGY_CONSERVATION: boolean

Default value used for activating energy conservation for the specular workflow. If activated, the albedo color is multiplied with (1. - maxChannel(specular color)). If deactivated, a material is only physically plausible, when (albedo color + specular color) < 1.

Static DEFAULT_USE_SPHERICAL_HARMONICSSearch playground for DEFAULT_USE_SPHERICAL_HARMONICS

DEFAULT_USE_SPHERICAL_HARMONICS: boolean

Default value used for the IBL diffuse part. This can help switching back to the polynomials mode globally which is a tiny bit less GPU intensive at the drawback of a lower quality.

Methods

copyToSearch playground for copyTo

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

    Parameters

    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"

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

    Parameters

    • defines: IMaterialBRDFDefines

      the list of "defines" to update.

    Returns void

serializeSearch playground for serialize

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

    Returns any

    • An object with the serialized config.

Legend

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