API

Class ClearCoatBlock

Block used to implement the clear coat module of the PBR material

Hierarchy (View Summary)

Index
comments: string = ""

Gets or sets the comments associated with this block

inputsAreExclusive: boolean = false

Gets or sets a boolean indicating that only one input can be connected at a time

onCodeIsReadyObservable: any = ...

Observable raised when the block code is ready (if the code loading is async)

remapF0OnInterfaceChange: boolean = true

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

uniqueId: number

Gets or sets the unique id of the node

visibleInInspector: boolean = false

Gets or sets a boolean indicating that this input can be edited in the Inspector (false by default)

visibleOnFrame: boolean = false

Gets or sets a boolean indicating that this input can be edited from a collapsed frame

  • get willBeGeneratedIntoVertexShaderFromFragmentShader(): boolean

    Gets a boolean indicating that the code of this block will be promoted to vertex shader even if connected to fragment output

    Returns boolean

  • Add uniforms, samplers and uniform buffers at compilation time

    Parameters

    • state: NodeMaterialBuildState

      defines the state to update

    • nodeMaterial: NodeMaterial

      defines the node material requesting the update

    • defines: NodeMaterialDefines

      defines the material defines to update

    • uniformBuffers: string[]

      defines the list of uniform buffer names

    Returns void

  • Gets the main code of the block (fragment side)

    Parameters

    • state: NodeMaterialBuildState

      current state of the node material building

    • ccBlock: Nullable<ClearCoatBlock>

      instance of a ClearCoatBlock or null if the code must be generated without an active clear coat module

    • reflectionBlock: Nullable<ReflectionBlock>

      instance of a ReflectionBlock null if the code must be generated without an active reflection module

    • worldPosVarName: string

      name of the variable holding the world position

    • generateTBNSpace: boolean

      if true, the code needed to create the TBN coordinate space is generated

    • vTBNAvailable: boolean

      indicate that the vTBN variable is already existing because it has already been generated by another block (PerturbNormal or Anisotropy)

    • worldNormalVarName: string

      name of the variable holding the world normal

    Returns string

    the shader code