Options
All
  • Public
  • Public/Protected
  • All
Menu

Block used to implement the PBR metallic/roughness model

Hierarchy

Index

Constructors

Properties

alphaTestCutoff: number

Defines the alpha limits in alpha test mode.

comments: string

Gets or sets the comments associated with this block

debugFactor: number

As the default viewing range might not be enough (if the ambient is really small for instance) You can use the factor to better multiply the final value.

debugLimit: number

Specify from where on screen the debug mode should start. The value goes from -1 (full screen) to 1 (not visible) It helps with side by side comparison against the final render This defaults to 0

debugMode: number

Defines the material debug mode. It helps seeing only some components of the material while troubleshooting.

directIntensity: number

Intensity of the direct lights e.g. the four lights available in your scene. This impacts both the direct diffuse and specular highlights.

enableSpecularAntiAliasing: boolean

Enables specular anti aliasing in the PBR shader. It will both interacts on the Geometry for analytical and IBL lighting. It also prefilter the roughness map based on the bump values.

environmentIntensity: number

Intensity of the environment e.g. how much the environment will light the object either through harmonics for rough material or through the reflection for shiny ones.

forceNormalForward: boolean

Force normal to face away from face.

generateOnlyFragmentCode: boolean

Indicates that no code should be generated in the vertex shader. Can be useful in some specific circumstances (like when doing ray marching for eg)

inputsAreExclusive: boolean

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

light: Nullable<Light>

Gets or sets the light associated with this block

lightFalloff: number

Defines the falloff type used in this material. It by default is Physical.

realTimeFiltering: boolean

Enables realtime filtering on the texture.

realTimeFilteringQuality: number

Quality switch for realtime filtering

specularIntensity: number

This is a special control allowing the reduction of the specular highlights coming from the four lights of the scene. Those highlights may not be needed in full environment lighting.

uniqueId: number

Gets or sets the unique id of the node

unlit: boolean

If set to true, no lighting calculations will be applied.

useAlphaBlending: boolean

Specifies that alpha blending should be used

useAlphaTest: boolean

Specifies that alpha test should be used

useEnergyConservation: boolean

Defines if the material uses energy conservation.

useHorizonOcclusion: boolean

This parameters will enable/disable Horizon occlusion to prevent normal maps to look shiny when the normal makes the reflect vector face the model (under horizon).

useRadianceOcclusion: boolean

This parameters will enable/disable radiance occlusion by preventing the radiance to lit too much the area relying on ambient texture to define their ambient occlusion.

useRadianceOverAlpha: boolean

Specifies that the material will keeps the reflection highlights over a transparent surface (only the most luminous ones). A car glass is a good example of that. When the street lights reflects on it you can not see what is behind.

useSpecularOverAlpha: boolean

Specifies that the material will keeps the specular highlights over a transparent surface (only the most luminous ones). A car glass is a good example of that. When sun reflects on it you can not see what is behind.

visibleInInspector: boolean

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

visibleOnFrame: boolean

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

Accessors

  • get buildId(): number
  • set buildId(value: number): void
  • Gets or sets the build Id

    Returns number

  • Gets or sets the build Id

    Parameters

    • value: number

    Returns void

  • Gets the list of input points

    Returns NodeMaterialConnectionPoint[]

  • get isFinalMerger(): boolean
  • Gets a boolean indicating that this block is an end block (e.g. it is generating a system value)

    Returns boolean

  • get isInput(): boolean
  • Gets a boolean indicating that this block is an input (e.g. it sends data to the shader)

    Returns boolean

  • get isTeleportIn(): boolean
  • Gets a boolean indicating if this block is a teleport in

    Returns boolean

  • get isTeleportOut(): boolean
  • Gets a boolean indicating if this block is a teleport out

    Returns boolean

  • get isUnique(): boolean
  • Gets a boolean indicating that this block can only be used once per NodeMaterial

    Returns boolean

  • get name(): string
  • set name(newName: string): void
  • Gets the name of the block

    Returns string

  • Sets the name of the block. Will check if the name is valid.

    Parameters

    • newName: string

    Returns void

  • Gets the list of output points

    Returns NodeMaterialConnectionPoint[]

  • Gets or sets the target of the block

    Returns NodeMaterialBlockTargets

  • Gets or sets the target of the block

    Parameters

    Returns void

  • 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

Methods

  • _deserialize(serializationObject: any, scene: Scene, rootUrl: string): void
  • Parameters

    • serializationObject: any
    • scene: Scene
    • rootUrl: string

    Returns void

  • Bind data to effect. Will only be called for blocks with isBindable === true

    Parameters

    Returns void

  • Compile the current node and generate the shader code

    Parameters

    • state: NodeMaterialBuildState

      defines the current compilation state (uniforms, samplers, current string)

    • activeBlocks: NodeMaterialBlock[]

      defines the list of active blocks (i.e. blocks to compile)

    Returns boolean

    true if already built

  • Clone the current block to a new identical block

    Parameters

    • scene: Scene

      defines the hosting scene

    • Optional rootUrl: string

      defines the root URL to use to load textures and relative dependencies

    Returns null | NodeMaterialBlock

    a copy of the current block

  • Connect current block with another block

    Parameters

    • other: NodeMaterialBlock

      defines the block to connect with

    • Optional options: { input?: string; output?: string; outputSwizzle?: string }

      define the various options to help pick the right connections

      • Optional input?: string
      • Optional output?: string
      • Optional outputSwizzle?: string

    Returns undefined | PBRMetallicRoughnessBlock

    the current block

  • dispose(): void
  • getClassName(): string
  • initializeDefines(mesh: AbstractMesh, nodeMaterial: NodeMaterial, defines: NodeMaterialDefines, useInstances?: boolean): void
  • Initialize defines for shader compilation

    Parameters

    • mesh: AbstractMesh

      defines the mesh to be rendered

    • nodeMaterial: NodeMaterial

      defines the node material requesting the update

    • defines: NodeMaterialDefines

      defines the material defines to update

    • Optional useInstances: boolean

      specifies that instances should be used

    Returns void

  • Checks if the current block is an ancestor of a given block

    Parameters

    Returns boolean

    true if block is a descendant

  • isConnectedInFragmentShader(): boolean
  • Function called when a block is declared as repeatable content generator

    Parameters

    • vertexShaderState: NodeMaterialBuildState

      defines the current compilation state for the vertex shader

    • fragmentShaderState: NodeMaterialBuildState

      defines the current compilation state for the fragment shader

    • mesh: AbstractMesh

      defines the mesh to be rendered

    • defines: NodeMaterialDefines

      defines the material defines to update

    Returns void

  • serialize(): any
  • Serializes this block in a JSON representation

    Returns any

  • validateBlockName(newName: string): boolean
  • Validates the new name for the block node.

    Parameters

    • newName: string

      the new name to be given to the node.

    Returns boolean

    false if the name is a reserve word, else true.

Legend

  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Static method

Settings

Theme