PBRBRDFConfiguration

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

Hierarchy

  • PBRBRDFConfiguration

Index

Constructors

constructor

Find examples in Playground
  • Instantiate a new istance of clear coat configuration.

    Parameters

    • markAllSubMeshesAsMiscDirty: function

      Callback to flag the material to dirty

        • (): void
        • Returns void

    Returns PBRBRDFConfiguration

Properties

useEnergyConservation

Find examples in Playground
useEnergyConservation: boolean

Defines if the material uses energy conservation.

useSmithVisibilityHeightCorrelated

Find examples in Playground
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.

useSphericalHarmonics

Find examples in Playground
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_CONSERVATION

Find examples in Playground
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_CORRELATED

Find examples in Playground
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_SPHERICAL_HARMONICS

Find examples in Playground
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

copyTo

Find examples in Playground
  • Makes a duplicate of the current configuration into another one.

    Parameters

    Returns void

getClassName

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

    Returns string

    "PBRClearCoatConfiguration"

parse

Find examples in Playground
  • 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

prepareDefines

Find examples in Playground
  • 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

serialize

Find examples in Playground
  • serialize(): any
  • Serializes this BRDF configuration.

    Returns any

    • An object with the serialized config.

Generated using TypeDoc