The Physically based material of BJS.
This offers the main features of a standard PBR material. For more information, please refer to the documentation : http://doc.babylonjs.com/extensions/Physically_Based_Rendering
AKA Diffuse Color in other nomenclature.
AKA Diffuse Texture in standard nomenclature.
Gets the alpha value of the material
Defines the alpha limits in alpha test mode.
Gets the value of the alpha mode
The color of a material in ambient lighting.
AKA Occlusion Texture in other nomenclature.
Defines how much the AO map is occluding the analytical lights (point spot...). 1 means it completely occludes it 0 mean it has no impact
AKA Occlusion Texture Intensity in other nomenclature.
Stores the animations for the material
Gets the back-face culling state
Stores surface normal data used to displace a mesh in a texture.
The color grading curves provide additional color adjustmnent that is applied after any color grading transform (3D LUT). They allow basic adjustment of saturation and small exposure adjustments, along with color filter tinting to provide white balance adjustment or more stylistic effects. These are similar to controls found in many professional imaging or colorist software. The global controls are applied to the entire image. For advanced tuning, extra controls are provided to adjust the shadow, midtone and highlight areas of the image; corresponding to low luminance, medium luminance, and high luminance areas respectively.
Sets wether the color curves effect is enabled.
Gets wether the color grading effect is enabled.
Sets the Color Grading 2D Lookup Texture.
Sets The camera contrast used on this material.
The camera exposure used on this material. This property is here and not in the camera to allow controlling exposure without full screen post process. This corresponds to a photographic exposure.
Sets wether tonemapping is enabled or not
Specifies if the ready state should be checked on each call
Specifies if the ready state should be checked once
Intensity of the direct lights e.g. the four lights available in your scene. This impacts both the direct diffuse and specular highlights.
Debug Control allowing disabling the bump map on this material.
Specifies if depth writing should be disabled
If sets to true, disables all the lights affecting the material.
Specifies if the material should be serialized
The color emitted from the material.
Intensity of the emissive part of the material. This helps controlling the emissive effect without modifying the emissive color.
Stores the emissive values in a texture.
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.
A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested. And/Or occlude the blended part.
Intensity of the environment e.g. how much the environment will light the object either through harmonics for rough material or through the refelction for shiny ones.
Sets the material fill mode
Gets the value of the fog enabled state
Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.
Specifies if depth writing should be forced
Force the shader to compute irradiance in the fragment shader in order to take bump in account.
Force normal to face away from face.
Callback triggered to get the render target textures
Gets a boolean indicating that current material needs to register RTT
The ID of the material
Sets the Default image processing configuration used either in the this material.
If sets to null, the scene one is in use.
source material index of refraction (IOR)' / 'destination material IOR.
If sets to true, x component of normal map value will invert (x = 1.0 - x).
If sets to true, y component of normal map value will invert (y = 1.0 - y).
Controls if refraction needs to be inverted on Y. This could be usefull for procedural texture.
Specifies if updates for the material been locked
Stores the pre-calculated light information of a mesh in a texture.
This parameters will make the material used its opacity to control how much it is refracting aginst not. Materials half opaque for instance using refraction could benefit from this control.
Number of Simultaneous lights allowed on the material.
Specifies the metallic scalar of the metallic/roughness workflow. Can also be used to scale the metalness values of the metallic texture.
Used to switch from specular/glossiness to metallic/roughness workflow.
AKA Glossiness in other nomenclature.
Used to enable roughness/glossiness fetch from a separate chanel depending on the current mode. Gray Scale represents roughness in metallic mode and glossiness in specular mode.
The name of the material
Gets the depth pre-pass value
Called during a bind event
An event triggered when the material is bound
Callback triggered when the material is compiled
Called during a dispose event
An event triggered when the material is disposed
Callback triggered when an error occurs
An event triggered when the material is unbound
Stores the alpha values in a texture.
Controls the scale bias of the parallax mode.
Stores the size of points
Sets the state of point cloud mode
The color reflected from the material.
Stores the reflection values in a texture.
AKA Specular Color in other nomenclature.
AKA Specular texture in other nomenclature.
Stores the refracted light information in a texture.
Specifies the roughness scalar of the metallic/roughness workflow. Can also be used to scale the roughness values of the metallic texture.
Specifies if there should be a separate pass for culling
Stores the value for side orientation
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.
The state of the material
Specifies if the effect should be stored on sub meshes
Sets the transparency mode of the material.
If sets to true and backfaceCulling is false, normals will be flipped on the backside.
Gets or sets the unique id of the material
If set to true, no lighting calculations will be applied.
A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested. And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)
Specifies that the alpha is coming form the albedo channel alpha channel for alpha blending.
Specifies if the ambient texture contains the ambient occlusion information in its red channel only.
Specifies if the metallic texture contains the ambient occlusion information in its red channel.
In case the reflectivity map does not contain the microsurface information in its alpha channel, The material will try to infer what glossiness each pixel should be.
In order to support the falloff compatibility with gltf, a special mode has been added to reproduce the gltf light falloff.
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).
A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested. And/Or occlude the blended part. (alpha stays linear to compute the fresnel)
Enabled the use of logarithmic depth buffers, which is good for wide depth buffers.
Specifies if the metallic texture contains the metallness information in its blue channel.
Specifies if the reflectivity texture contains the glossiness information in its alpha channel.
Allows using an object space normal map (instead of tangent space).
Allows using the bump map in parallax mode.
Allows using the bump map in parallax occlusion mode.
BJS is using an harcoded light falloff based on a manually sets up range. In PBR, one way to represents the fallof is to use the inverse squared root algorythm. This parameter can help you switch back to the BJS mode in order to create scenes using both materials.
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.
Specifies that the material will keeps the reflection highlights over a transparent surface (only the most limunous ones). A car glass is a good exemple of that. When the street lights reflects on it you can not see what is behind.
Specifies if the metallic texture contains the roughness information in its alpha channel.
Specifies if the metallic texture contains the roughness information in its green channel.
Specifies that the material will keeps the specular highlights over a transparent surface (only the most limunous ones). A car glass is a good exemple of that. When sun reflects on it you can not see what is behind.
Sets the state of wireframe mode
Stores the z offset value
The all dirty flag value
The dirty attribute flag value
Returns the clock-wise side orientation
Returns the counter clock-wise side orientation
Defines the default value of how much AO map is occluding the analytical lights (point spot...).
The dirty fresnel flag value
PBRMaterialLightFalloff gltf: light is falling off as described in the gltf moving to PBR document to enhance interoperability with other engines.
PBRMaterialLightFalloff Physical: light is falling off following the inverse squared distance law.
PBRMaterialLightFalloff Standard: light is falling off like in the standard material to enhance interoperability with other materials.
The dirty light flag value
Returns the line list draw mode
Returns the line loop draw mode
Returns the line strip draw mode
The dirty misc flag value
PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.
PBRMaterialTransparencyMode: Alpha Test mode, pixel are discarded below a certain threshold defined by the alpha cutoff value.
PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer. They are also discarded below the alpha cutoff threshold to improve performances.
PBRMaterialTransparencyMode: No transparency mode, Alpha channel is not use.
Returns the point fill mode
Returns the point list draw mode
The dirty texture flag value
Returns the triangle fan draw mode
Returns the triangle fill mode
Returns the triangle strip draw mode
Returns the wireframe mode
Binds the given normal matrix to the active effect
the matrix to bind
Binds the given world matrix to the active effect
the matrix to bind
Binds the view matrix to the effect
defines the effect to bind the view matrix to
Binds the view projection matrix to the effect
defines the effect to bind the view projection matrix to
Initializes the uniform buffer layout for the shader.
Makes a duplicate of the current material.
name to use for the new material.
Disposes the resources of the material.
Forces the disposal of effects.
Forces the disposal of all textures.
Force shader compilation
defines the mesh that will use this material
defines additional options for compiling the shaders
a promise that resolves when the compilation completes
Locks updates for the material
Returns an array of the actively used textures.
Gets the texture used for the alpha test.
Returns the animatable textures.
Gets the meshes bound to the material
an array of meshes bound to the material
Returns the name of this material class.
Returns the current scene
Checks to see if a texture is used in the material.
Base texture to use.
Specifies if the material uses metallic roughness workflow.
boolean specifiying if the material uses metallic roughness workflow.
Specifies that the submesh is ready to be used.
A submesh of the BJS mesh. Used to check if it is ready.
Specifies that instances should be used.
Marks a define in the material to indicate that it needs to be re-computed
defines a flag used to determine which parts of the material have to be marked as dirty
Marks the material to indicate that it needs to be re-calculated
Specifies whether or not this material should be rendered in alpha blend mode.
Specifies if the mesh will require alpha blending.
Specifies whether or not this material should be rendered in alpha test mode.
Serializes this PBR Material.
Returns a string representation of the current material
defines a boolean indicating which levels of logging is desired
a string with material information
Unbinds the textures.
Unlocks updates for the material
Generated using TypeDoc