API

Class AmbientOcclusionBlock

Block used to evaluate screen spaceambient occlusion in a shader

Hierarchy (View Summary)

Index
area: number = 0.0075

Related to fallOff, used to interpolate SSAO samples (first interpolate function input) based on the occlusion difference of each pixel Must not be equal to fallOff and superior to fallOff.

comments: string = ""

Gets or sets the comments associated with this block

fallOff: number = 0.000001

Related to area, used to interpolate SSAO samples (second interpolate function input) based on the occlusion difference of each pixel Must not be equal to area and inferior to area.

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)

radius: number = 0.0001

Defines the radius around the analyzed pixel used by the SSAO post-process

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