API

Class RefractionBlock

Block used to implement the refraction part of the sub surface 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

invertRefractionY: boolean = false

Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.

linkRefractionWithTransparency: boolean = false

This parameters will make the material used its opacity to control how much it is refracting against not. Materials half opaque for instance using refraction could benefit from this control.

onCodeIsReadyObservable: any = ...

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

Gets or sets the texture associated with the node

uniqueId: number

Gets or sets the unique id of the node

useThicknessAsDepth: boolean = false

Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.

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