API

Class PBRMetallicRoughnessBlock

Block used to implement the PBR metallic/roughness model

Hierarchy (View Summary)

Index
alphaTestCutoff: number = 0.5

Defines the alpha limits in alpha test mode.

baseDiffuseModel: number = Constants.MATERIAL_DIFFUSE_MODEL_E_OREN_NAYAR

Base Diffuse Model

comments: string = ""

Gets or sets the comments associated with this block

debugFactor: number = 1

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 = 0

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 = 0

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

directIntensity: number = 1.0

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 = false

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 = 1.0

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 = false

Force normal to face away from face.

generateOnlyFragmentCode: boolean = false

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 = false

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 = 0

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

onCodeIsReadyObservable: any = ...

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

realTimeFiltering: boolean = false

Enables realtime filtering on the texture.

realTimeFilteringQuality: number = Constants.TEXTURE_FILTERING_QUALITY_LOW

Quality switch for realtime filtering

specularIntensity: number = 1.0

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 = false

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

useAlphaBlending: boolean = false

Specifies that alpha blending should be used

useAlphaTest: boolean = false

Specifies that alpha test should be used

useEnergyConservation: boolean = true

Defines if the material uses energy conservation.

useHorizonOcclusion: boolean = true

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 = true

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 = true

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 = true

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 = 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