Skip to main content

Class: OccluderMaterial

@geenee/bodyrenderers-babylon.OccluderMaterial

Occluder material

Occluders are elements of a scene that are not rendered by themselves but still participate in occlusion queries. Usually, occluder is a base mesh (average approximation) of a body representing its real counterpart in a scene. Occluders are used to mask visible virtual objects behind them (like geometries of a 3D scene behind user's body). Applying OccluderMaterial to a mesh makes it an occluder.

Hierarchy

  • StandardMaterial

    OccluderMaterial

Constructors

constructor

new OccluderMaterial(name, scene?)

Constructor

Parameters

NameTypeDescription
namestringName of the material in the scene
scene?SceneScene the material belongs to

Overrides

babylon.StandardMaterial.constructor

Properties

_activeEffect

Protected _activeEffect: Effect

Inherited from

babylon.StandardMaterial._activeEffect


_alpha

Protected _alpha: number

The alpha value of the material

Inherited from

babylon.StandardMaterial._alpha


_backFaceCulling

Protected _backFaceCulling: boolean

Specifies if back face culling is enabled

Inherited from

babylon.StandardMaterial._backFaceCulling


_cacheHasRenderTargetTextures

Protected _cacheHasRenderTargetTextures: boolean

Inherited from

babylon.StandardMaterial._cacheHasRenderTargetTextures


_callbackPluginEventBindForSubMesh

_callbackPluginEventBindForSubMesh: (eventData: MaterialPluginBindForSubMesh) => void

Type declaration

▸ (eventData): void

Parameters
NameType
eventDataMaterialPluginBindForSubMesh
Returns

void

Inherited from

babylon.StandardMaterial._callbackPluginEventBindForSubMesh


_callbackPluginEventFillRenderTargetTextures

_callbackPluginEventFillRenderTargetTextures: (eventData: MaterialPluginFillRenderTargetTextures) => void

Type declaration

▸ (eventData): void

Parameters
NameType
eventDataMaterialPluginFillRenderTargetTextures
Returns

void

Inherited from

babylon.StandardMaterial._callbackPluginEventFillRenderTargetTextures


_callbackPluginEventGeneric

_callbackPluginEventGeneric: (id: number, info: MaterialPluginDisposed | MaterialPluginHasTexture | MaterialPluginGetDefineNames | MaterialPluginPrepareEffect | MaterialPluginPrepareUniformBuffer | MaterialPluginGetAnimatables | MaterialPluginGetActiveTextures) => void

Type declaration

▸ (id, info): void

Parameters
NameType
idnumber
infoMaterialPluginDisposed | MaterialPluginHasTexture | MaterialPluginGetDefineNames | MaterialPluginPrepareEffect | MaterialPluginPrepareUniformBuffer | MaterialPluginGetAnimatables | MaterialPluginGetActiveTextures
Returns

void

Inherited from

babylon.StandardMaterial._callbackPluginEventGeneric


_callbackPluginEventHardBindForSubMesh

_callbackPluginEventHardBindForSubMesh: (eventData: MaterialPluginHardBindForSubMesh) => void

Type declaration

▸ (eventData): void

Parameters
NameType
eventDataMaterialPluginHardBindForSubMesh
Returns

void

Inherited from

babylon.StandardMaterial._callbackPluginEventHardBindForSubMesh


_callbackPluginEventHasRenderTargetTextures

_callbackPluginEventHasRenderTargetTextures: (eventData: MaterialPluginHasRenderTargetTextures) => void

Type declaration

▸ (eventData): void

Parameters
NameType
eventDataMaterialPluginHasRenderTargetTextures
Returns

void

Inherited from

babylon.StandardMaterial._callbackPluginEventHasRenderTargetTextures


_callbackPluginEventIsReadyForSubMesh

_callbackPluginEventIsReadyForSubMesh: (eventData: MaterialPluginIsReadyForSubMesh) => void

Type declaration

▸ (eventData): void

Parameters
NameType
eventDataMaterialPluginIsReadyForSubMesh
Returns

void

Inherited from

babylon.StandardMaterial._callbackPluginEventIsReadyForSubMesh


_callbackPluginEventPrepareDefines

_callbackPluginEventPrepareDefines: (eventData: MaterialPluginPrepareDefines) => void

Type declaration

▸ (eventData): void

Parameters
NameType
eventDataMaterialPluginPrepareDefines
Returns

void

Inherited from

babylon.StandardMaterial._callbackPluginEventPrepareDefines


_callbackPluginEventPrepareDefinesBeforeAttributes

_callbackPluginEventPrepareDefinesBeforeAttributes: (eventData: MaterialPluginPrepareDefines) => void

Type declaration

▸ (eventData): void

Parameters
NameType
eventDataMaterialPluginPrepareDefines
Returns

void

Inherited from

babylon.StandardMaterial._callbackPluginEventPrepareDefinesBeforeAttributes


_cullBackFaces

Protected _cullBackFaces: boolean

Specifies if back or front faces should be culled (when culling is enabled)

Inherited from

babylon.StandardMaterial._cullBackFaces


_dirtyCallbacks

_dirtyCallbacks: Object

Index signature

[code: number]: () => void

Inherited from

babylon.StandardMaterial._dirtyCallbacks


_drawWrapper

Protected _drawWrapper: DrawWrapper

Inherited from

babylon.StandardMaterial._drawWrapper


_eventInfo

Protected _eventInfo: MaterialPluginDisposed & MaterialPluginHasTexture & MaterialPluginIsReadyForSubMesh & MaterialPluginGetDefineNames & MaterialPluginPrepareEffect & MaterialPluginPrepareDefines & MaterialPluginPrepareUniformBuffer & MaterialPluginBindForSubMesh & MaterialPluginGetAnimatables & MaterialPluginGetActiveTextures & MaterialPluginFillRenderTargetTextures & MaterialPluginHasRenderTargetTextures & MaterialPluginHardBindForSubMesh

Inherited from

babylon.StandardMaterial._eventInfo


_forceAlphaTest

Protected _forceAlphaTest: boolean

Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.

Inherited from

babylon.StandardMaterial._forceAlphaTest


_globalAmbientColor

Protected _globalAmbientColor: Color3

Inherited from

babylon.StandardMaterial._globalAmbientColor


_imageProcessingConfiguration

Protected _imageProcessingConfiguration: ImageProcessingConfiguration

Default configuration related to image processing available in the standard Material.

Inherited from

babylon.StandardMaterial._imageProcessingConfiguration


_indexInSceneMaterialArray

_indexInSceneMaterialArray: number

Inherited from

babylon.StandardMaterial._indexInSceneMaterialArray


_loadedUniqueId

_loadedUniqueId: string

Inherited from

babylon.StandardMaterial._loadedUniqueId


_materialContext

Protected _materialContext: undefined | IMaterialContext

Stores the effects for the material

Inherited from

babylon.StandardMaterial._materialContext


_needToBindSceneUbo

Protected _needToBindSceneUbo: boolean

Inherited from

babylon.StandardMaterial._needToBindSceneUbo


_normalMatrix

Protected _normalMatrix: Matrix

Inherited from

babylon.StandardMaterial._normalMatrix


_onEffectCreatedObservable

Protected _onEffectCreatedObservable: Nullable<Observable<{ effect: Effect ; subMesh: Nullable<SubMesh> }>>

Inherited from

babylon.StandardMaterial._onEffectCreatedObservable


_parentContainer

_parentContainer: Nullable<AbstractScene>

Inherited from

babylon.StandardMaterial._parentContainer


_renderTargets

Protected _renderTargets: SmartArray<RenderTargetTexture>

Inherited from

babylon.StandardMaterial._renderTargets


_storeEffectOnSubMeshes

_storeEffectOnSubMeshes: boolean

Inherited from

babylon.StandardMaterial._storeEffectOnSubMeshes


_transparencyMode

Protected _transparencyMode: Nullable<number>

The transparency mode of the material.

Inherited from

babylon.StandardMaterial._transparencyMode


_uniformBuffer

_uniformBuffer: UniformBuffer

Stores the uniform buffer

Inherited from

babylon.StandardMaterial._uniformBuffer


_uniformBufferLayoutBuilt

_uniformBufferLayoutBuilt: boolean

Inherited from

babylon.StandardMaterial._uniformBufferLayoutBuilt


_useLogarithmicDepth

Protected _useLogarithmicDepth: boolean

Inherited from

babylon.StandardMaterial._useLogarithmicDepth


_worldViewProjectionMatrix

Protected _worldViewProjectionMatrix: Matrix

Inherited from

babylon.StandardMaterial._worldViewProjectionMatrix


allowShaderHotSwapping

allowShaderHotSwapping: boolean

Gets or sets a boolean indicating that the material is allowed (if supported) to do shader hot swapping. This means that the material can keep using a previous shader while a new one is being compiled. This is mostly used when shader parallel compilation is supported (true by default)

Inherited from

babylon.StandardMaterial.allowShaderHotSwapping


alphaCutOff

alphaCutOff: number

Defines the alpha limits in alpha test mode.

Inherited from

babylon.StandardMaterial.alphaCutOff


ambientColor

ambientColor: Color3

The color of the material lit by the environmental background lighting.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#ambient-color-example

Inherited from

babylon.StandardMaterial.ambientColor


ambientTexture

ambientTexture: Nullable<BaseTexture>

AKA Occlusion Texture in other nomenclature, it helps adding baked shadows into your material.

Inherited from

babylon.StandardMaterial.ambientTexture


animations

animations: Nullable<Animation[]>

Stores the animations for the material

Inherited from

babylon.StandardMaterial.animations


bumpTexture

bumpTexture: Nullable<BaseTexture>

Bump mapping is a technique to simulate bump and dents on a rendered surface. These are made by creating a normal map from an image. The means to do this can be found on the web, a search for 'normal map generator' will bring up free and paid for methods of doing this.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#bump-map

Inherited from

babylon.StandardMaterial.bumpTexture


checkReadyOnEveryCall

checkReadyOnEveryCall: boolean

Specifies if the ready state should be checked on each call

Inherited from

babylon.StandardMaterial.checkReadyOnEveryCall


checkReadyOnlyOnce

checkReadyOnlyOnce: boolean

Specifies if the ready state should be checked once

Inherited from

babylon.StandardMaterial.checkReadyOnlyOnce


clipPlane

clipPlane: Nullable<Plane>

Gets or sets the active clipplane 1

Inherited from

babylon.StandardMaterial.clipPlane


clipPlane2

clipPlane2: Nullable<Plane>

Gets or sets the active clipplane 2

Inherited from

babylon.StandardMaterial.clipPlane2


clipPlane3

clipPlane3: Nullable<Plane>

Gets or sets the active clipplane 3

Inherited from

babylon.StandardMaterial.clipPlane3


clipPlane4

clipPlane4: Nullable<Plane>

Gets or sets the active clipplane 4

Inherited from

babylon.StandardMaterial.clipPlane4


clipPlane5

clipPlane5: Nullable<Plane>

Gets or sets the active clipplane 5

Inherited from

babylon.StandardMaterial.clipPlane5


clipPlane6

clipPlane6: Nullable<Plane>

Gets or sets the active clipplane 6

Inherited from

babylon.StandardMaterial.clipPlane6


customShaderNameResolve

customShaderNameResolve: (shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: string[] | MaterialDefines, attributes?: string[], options?: ICustomShaderNameResolveOptions) => string

Type declaration

▸ (shaderName, uniforms, uniformBuffers, samplers, defines, attributes?, options?): string

Custom callback helping to override the default shader used in the material.

Parameters
NameType
shaderNamestring
uniformsstring[]
uniformBuffersstring[]
samplersstring[]
definesstring[] | MaterialDefines
attributes?string[]
options?ICustomShaderNameResolveOptions
Returns

string

Inherited from

babylon.StandardMaterial.customShaderNameResolve


depthFunction

depthFunction: number

Specifies the depth function that should be used. 0 means the default engine function

Inherited from

babylon.StandardMaterial.depthFunction


detailMap

Readonly detailMap: DetailMapConfiguration

Defines the detail map parameters for the material.

Inherited from

babylon.StandardMaterial.detailMap


diffuseColor

diffuseColor: Color3

The basic color of the material as viewed under a light.

Inherited from

babylon.StandardMaterial.diffuseColor


diffuseFresnelParameters

diffuseFresnelParameters: FresnelParameters

Define the diffuse fresnel parameters of the material.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters

Inherited from

babylon.StandardMaterial.diffuseFresnelParameters


diffuseTexture

diffuseTexture: Nullable<BaseTexture>

The basic texture of the material as viewed under a light.

Inherited from

babylon.StandardMaterial.diffuseTexture


disableColorWrite

disableColorWrite: boolean

Specifies if color writing should be disabled

Inherited from

babylon.StandardMaterial.disableColorWrite


disableDepthWrite

disableDepthWrite: boolean

Specifies if depth writing should be disabled

Inherited from

babylon.StandardMaterial.disableDepthWrite


disableLighting

disableLighting: boolean

Does lights from the scene impacts this material. It can be a nice trick for performance to disable lighting on a fully emissive material.

Inherited from

babylon.StandardMaterial.disableLighting


doNotSerialize

doNotSerialize: boolean

Specifies if the material should be serialized

Inherited from

babylon.StandardMaterial.doNotSerialize


emissiveColor

emissiveColor: Color3

Define the color of the material as if self lit. This will be mixed in the final result even in the absence of light.

Inherited from

babylon.StandardMaterial.emissiveColor


emissiveFresnelParameters

emissiveFresnelParameters: FresnelParameters

Define the emissive fresnel parameters of the material.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters

Inherited from

babylon.StandardMaterial.emissiveFresnelParameters


emissiveTexture

emissiveTexture: Nullable<BaseTexture>

Define texture of the material as if self lit. This will be mixed in the final result even in the absence of light.

Inherited from

babylon.StandardMaterial.emissiveTexture


forceDepthWrite

forceDepthWrite: boolean

Specifies if depth writing should be forced

Inherited from

babylon.StandardMaterial.forceDepthWrite


getRenderTargetTextures

getRenderTargetTextures: Nullable<() => SmartArray<RenderTargetTexture>>

Callback triggered to get the render target textures

Inherited from

babylon.StandardMaterial.getRenderTargetTextures


id

id: string

The ID of the material

Inherited from

babylon.StandardMaterial.id


indexOfRefraction

indexOfRefraction: number

In case of refraction, define the value of the index of refraction.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions

Inherited from

babylon.StandardMaterial.indexOfRefraction


inspectableCustomProperties

inspectableCustomProperties: IInspectable[]

List of inspectable custom properties (used by the Inspector)

See

https://doc.babylonjs.com/toolsAndResources/inspector#extensibility

Inherited from

babylon.StandardMaterial.inspectableCustomProperties


invertNormalMapX

invertNormalMapX: boolean

If sets to true, x component of normal map value will invert (x = 1.0 - x).

Inherited from

babylon.StandardMaterial.invertNormalMapX


invertNormalMapY

invertNormalMapY: boolean

If sets to true, y component of normal map value will invert (y = 1.0 - y).

Inherited from

babylon.StandardMaterial.invertNormalMapY


invertRefractionY

invertRefractionY: boolean

Invert the refraction texture alongside the y axis. It can be useful with procedural textures or probe for instance.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions

Inherited from

babylon.StandardMaterial.invertRefractionY


lightmapTexture

lightmapTexture: Nullable<BaseTexture>

Complex lighting can be computationally expensive to compute at runtime. To save on computation, lightmaps may be used to store calculated lighting in a texture which will be applied to a given mesh.

See

https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction#lightmaps

Inherited from

babylon.StandardMaterial.lightmapTexture


linkEmissiveWithDiffuse

linkEmissiveWithDiffuse: boolean

If true, some kind of energy conservation will prevent the end result to be more than 1 by reducing the emissive level when the final color is close to one.

Inherited from

babylon.StandardMaterial.linkEmissiveWithDiffuse


maxSimultaneousLights

maxSimultaneousLights: number

Defines the maximum number of lights that can be used in the material

Inherited from

babylon.StandardMaterial.maxSimultaneousLights


meshMap

meshMap: Nullable<{ [id: string]: AbstractMesh | undefined; }>

Inherited from

babylon.StandardMaterial.meshMap


metadata

metadata: any

Gets or sets user defined metadata

Inherited from

babylon.StandardMaterial.metadata


name

name: string

The name of the material

Inherited from

babylon.StandardMaterial.name


onCompiled

onCompiled: Nullable<(effect: Effect) => void>

Callback triggered when the material is compiled

Inherited from

babylon.StandardMaterial.onCompiled


onDisposeObservable

onDisposeObservable: Observable<Material>

An event triggered when the material is disposed

Inherited from

babylon.StandardMaterial.onDisposeObservable


onError

onError: Nullable<(effect: Effect, errors: string) => void>

Callback triggered when an error occurs

Inherited from

babylon.StandardMaterial.onError


opacityFresnelParameters

opacityFresnelParameters: FresnelParameters

Define the opacity fresnel parameters of the material.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters

Inherited from

babylon.StandardMaterial.opacityFresnelParameters


opacityTexture

opacityTexture: Nullable<BaseTexture>

Define the transparency of the material from a texture. The final alpha value can be read either from the red channel (if texture.getAlphaFromRGB is false) or from the luminance or the current texel (if texture.getAlphaFromRGB is true)

Inherited from

babylon.StandardMaterial.opacityTexture


parallaxScaleBias

parallaxScaleBias: number

Apply a scaling factor that determine which "depth" the height map should reprensent. A value between 0.05 and 0.1 is reasonnable in Parallax, you can reach 0.2 using Parallax Occlusion.

Inherited from

babylon.StandardMaterial.parallaxScaleBias


pluginManager

Optional pluginManager: MaterialPluginManager

Plugin manager for this material

Inherited from

babylon.StandardMaterial.pluginManager


pointSize

pointSize: number

Stores the size of points

Inherited from

babylon.StandardMaterial.pointSize


prePassConfiguration

Readonly prePassConfiguration: PrePassConfiguration

Defines additional PrePass parameters for the material.

Inherited from

babylon.StandardMaterial.prePassConfiguration


reflectionFresnelParameters

reflectionFresnelParameters: FresnelParameters

Define the reflection fresnel parameters of the material.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters

Inherited from

babylon.StandardMaterial.reflectionFresnelParameters


reflectionTexture

reflectionTexture: Nullable<BaseTexture>

Define the texture used to display the reflection.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions

Inherited from

babylon.StandardMaterial.reflectionTexture


refractionFresnelParameters

refractionFresnelParameters: FresnelParameters

Define the refraction fresnel parameters of the material.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters

Inherited from

babylon.StandardMaterial.refractionFresnelParameters


refractionTexture

refractionTexture: Nullable<BaseTexture>

Define the texture used to display the refraction.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions

Inherited from

babylon.StandardMaterial.refractionTexture


reservedDataStore

reservedDataStore: any

For internal use only. Please do not use.

Inherited from

babylon.StandardMaterial.reservedDataStore


roughness

roughness: number

Helps to define how blurry the reflections should appears in the material.

Inherited from

babylon.StandardMaterial.roughness


separateCullingPass

separateCullingPass: boolean

Specifies if there should be a separate pass for culling

Inherited from

babylon.StandardMaterial.separateCullingPass


shadowDepthWrapper

shadowDepthWrapper: Nullable<ShadowDepthWrapper>

Custom shadow depth material to use for shadow rendering instead of the in-built one

Inherited from

babylon.StandardMaterial.shadowDepthWrapper


sideOrientation

sideOrientation: number

Stores the value for side orientation

Inherited from

babylon.StandardMaterial.sideOrientation


specularColor

specularColor: Color3

Define how the color and intensity of the highlight given by the light in the material.

Inherited from

babylon.StandardMaterial.specularColor


specularPower

specularPower: number

Defines how sharp are the highlights in the material. The bigger the value the sharper giving a more glossy feeling to the result. Reversely, the smaller the value the blurrier giving a more rough feeling to the result.

Inherited from

babylon.StandardMaterial.specularPower


specularTexture

specularTexture: Nullable<BaseTexture>

Define how the color and intensity of the highlight given by the light in the material.

Inherited from

babylon.StandardMaterial.specularTexture


state

state: string

The state of the material

Inherited from

babylon.StandardMaterial.state


stencil

Readonly stencil: MaterialStencilState

Gives access to the stencil properties of the material

Inherited from

babylon.StandardMaterial.stencil


twoSidedLighting

twoSidedLighting: boolean

If sets to true and backfaceCulling is false, normals will be flipped on the backside.

Inherited from

babylon.StandardMaterial.twoSidedLighting


uniqueId

uniqueId: number

Gets or sets the unique id of the material

Inherited from

babylon.StandardMaterial.uniqueId


useAlphaFromDiffuseTexture

useAlphaFromDiffuseTexture: boolean

Does the transparency come from the diffuse texture alpha channel.

Inherited from

babylon.StandardMaterial.useAlphaFromDiffuseTexture


useEmissiveAsIllumination

useEmissiveAsIllumination: boolean

If true, the emissive value is added into the end result, otherwise it is multiplied in.

Inherited from

babylon.StandardMaterial.useEmissiveAsIllumination


useGlossinessFromSpecularMapAlpha

useGlossinessFromSpecularMapAlpha: boolean

Defines if the glossiness/roughness of the material should be read from the specular map alpha channel

Inherited from

babylon.StandardMaterial.useGlossinessFromSpecularMapAlpha


useLightmapAsShadowmap

useLightmapAsShadowmap: boolean

In case of light mapping, define whether the map contains light or shadow informations.

Inherited from

babylon.StandardMaterial.useLightmapAsShadowmap


useObjectSpaceNormalMap

useObjectSpaceNormalMap: boolean

Allows using an object space normal map (instead of tangent space).

Inherited from

babylon.StandardMaterial.useObjectSpaceNormalMap


useParallax

useParallax: boolean

Is parallax enabled or not.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/parallaxMapping

Inherited from

babylon.StandardMaterial.useParallax


useParallaxOcclusion

useParallaxOcclusion: boolean

Is parallax occlusion enabled or not. If true, the outcome is way more realistic than traditional Parallax but you can expect a performance hit that worthes consideration.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/parallaxMapping

Inherited from

babylon.StandardMaterial.useParallaxOcclusion


useReflectionFresnelFromSpecular

useReflectionFresnelFromSpecular: boolean

If true automatically deducts the fresnels values from the material specularity.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters

Inherited from

babylon.StandardMaterial.useReflectionFresnelFromSpecular


useReflectionOverAlpha

useReflectionOverAlpha: 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 exemple of that. When the street lights reflects on it you can not see what is behind.

Inherited from

babylon.StandardMaterial.useReflectionOverAlpha


useSpecularOverAlpha

useSpecularOverAlpha: boolean

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

Inherited from

babylon.StandardMaterial.useSpecularOverAlpha


zOffset

zOffset: number

Stores the z offset Factor value

Inherited from

babylon.StandardMaterial.zOffset


zOffsetUnits

zOffsetUnits: number

Stores the z offset Units value

Inherited from

babylon.StandardMaterial.zOffsetUnits


AllDirtyFlag

Static Readonly AllDirtyFlag: 63

The all dirty flag value

Inherited from

babylon.StandardMaterial.AllDirtyFlag


AttributesDirtyFlag

Static Readonly AttributesDirtyFlag: 8

The dirty attribute flag value

Inherited from

babylon.StandardMaterial.AttributesDirtyFlag


ClockWiseSideOrientation

Static Readonly ClockWiseSideOrientation: 0

Stores the clock-wise side orientation

Inherited from

babylon.StandardMaterial.ClockWiseSideOrientation


CounterClockWiseSideOrientation

Static Readonly CounterClockWiseSideOrientation: 1

Stores the counter clock-wise side orientation

Inherited from

babylon.StandardMaterial.CounterClockWiseSideOrientation


FresnelDirtyFlag

Static Readonly FresnelDirtyFlag: 4

The dirty fresnel flag value

Inherited from

babylon.StandardMaterial.FresnelDirtyFlag


LightDirtyFlag

Static Readonly LightDirtyFlag: 2

The dirty light flag value

Inherited from

babylon.StandardMaterial.LightDirtyFlag


LineListDrawMode

Static Readonly LineListDrawMode: 4

Returns the line list draw mode

Inherited from

babylon.StandardMaterial.LineListDrawMode


LineLoopDrawMode

Static Readonly LineLoopDrawMode: 5

Returns the line loop draw mode

Inherited from

babylon.StandardMaterial.LineLoopDrawMode


LineStripDrawMode

Static Readonly LineStripDrawMode: 6

Returns the line strip draw mode

Inherited from

babylon.StandardMaterial.LineStripDrawMode


MATERIAL_ALPHABLEND

Static Readonly MATERIAL_ALPHABLEND: 2

MaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.

Inherited from

babylon.StandardMaterial.MATERIAL_ALPHABLEND


MATERIAL_ALPHATEST

Static Readonly MATERIAL_ALPHATEST: 1

MaterialTransparencyMode: Alpha Test mode, pixel are discarded below a certain threshold defined by the alpha cutoff value.

Inherited from

babylon.StandardMaterial.MATERIAL_ALPHATEST


MATERIAL_ALPHATESTANDBLEND

Static Readonly MATERIAL_ALPHATESTANDBLEND: 3

MaterialTransparencyMode: 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.

Inherited from

babylon.StandardMaterial.MATERIAL_ALPHATESTANDBLEND


MATERIAL_NORMALBLENDMETHOD_RNM

Static Readonly MATERIAL_NORMALBLENDMETHOD_RNM: 1

The Reoriented Normal Mapping method is used to blend normals. Details of the algorithm can be found here: https://blog.selfshadow.com/publications/blending-in-detail/

Inherited from

babylon.StandardMaterial.MATERIAL_NORMALBLENDMETHOD_RNM


MATERIAL_NORMALBLENDMETHOD_WHITEOUT

Static Readonly MATERIAL_NORMALBLENDMETHOD_WHITEOUT: 0

The Whiteout method is used to blend normals. Details of the algorithm can be found here: https://blog.selfshadow.com/publications/blending-in-detail/

Inherited from

babylon.StandardMaterial.MATERIAL_NORMALBLENDMETHOD_WHITEOUT


MATERIAL_OPAQUE

Static Readonly MATERIAL_OPAQUE: 0

MaterialTransparencyMode: No transparency mode, Alpha channel is not use.

Inherited from

babylon.StandardMaterial.MATERIAL_OPAQUE


MiscDirtyFlag

Static Readonly MiscDirtyFlag: 16

The dirty misc flag value

Inherited from

babylon.StandardMaterial.MiscDirtyFlag


OnEventObservable

Static OnEventObservable: Observable<Material>

Event observable which raises global events common to all materials (like MaterialPluginEvent.Created)

Inherited from

babylon.StandardMaterial.OnEventObservable


PointFillMode

Static Readonly PointFillMode: 2

Returns the point fill mode

Inherited from

babylon.StandardMaterial.PointFillMode


PointListDrawMode

Static Readonly PointListDrawMode: 3

Returns the point list draw mode

Inherited from

babylon.StandardMaterial.PointListDrawMode


PrePassDirtyFlag

Static Readonly PrePassDirtyFlag: 32

The dirty prepass flag value

Inherited from

babylon.StandardMaterial.PrePassDirtyFlag


TextureDirtyFlag

Static Readonly TextureDirtyFlag: 1

The dirty texture flag value

Inherited from

babylon.StandardMaterial.TextureDirtyFlag


TriangleFanDrawMode

Static Readonly TriangleFanDrawMode: 8

Returns the triangle fan draw mode

Inherited from

babylon.StandardMaterial.TriangleFanDrawMode


TriangleFillMode

Static Readonly TriangleFillMode: 0

Returns the triangle fill mode

Inherited from

babylon.StandardMaterial.TriangleFillMode


TriangleStripDrawMode

Static Readonly TriangleStripDrawMode: 7

Returns the triangle strip draw mode

Inherited from

babylon.StandardMaterial.TriangleStripDrawMode


WireFrameFillMode

Static Readonly WireFrameFillMode: 1

Returns the wireframe mode

Inherited from

babylon.StandardMaterial.WireFrameFillMode

Accessors

_disableAlphaBlending

Protected get _disableAlphaBlending(): boolean

Returns true if alpha blending should be disabled.

Returns

boolean

Inherited from

babylon.StandardMaterial._disableAlphaBlending


alpha

get alpha(): number

Gets the alpha value of the material

Returns

number

Inherited from

babylon.StandardMaterial.alpha

set alpha(value): void

Sets the alpha value of the material

Parameters

NameType
valuenumber

Returns

void

Inherited from

babylon.StandardMaterial.alpha


alphaMode

get alphaMode(): number

Gets the value of the alpha mode

Returns

number

Inherited from

babylon.StandardMaterial.alphaMode

set alphaMode(value): void

Sets the value of the alpha mode.

ValueTypeDescription
0ALPHA_DISABLE
1ALPHA_ADD
2ALPHA_COMBINE
3ALPHA_SUBTRACT
4ALPHA_MULTIPLY
5ALPHA_MAXIMIZED
6ALPHA_ONEONE
7ALPHA_PREMULTIPLIED
8ALPHA_PREMULTIPLIED_PORTERDUFF
9ALPHA_INTERPOLATE
10ALPHA_SCREENMODE

Parameters

NameType
valuenumber

Returns

void

Inherited from

babylon.StandardMaterial.alphaMode


backFaceCulling

get backFaceCulling(): boolean

Gets the culling state

Returns

boolean

Inherited from

babylon.StandardMaterial.backFaceCulling

set backFaceCulling(value): void

Sets the culling state (true to enable culling, false to disable)

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.backFaceCulling


blockDirtyMechanism

get blockDirtyMechanism(): boolean

Block the dirty-mechanism for this specific material When set to false after being true the material will be marked as dirty.

Returns

boolean

Inherited from

babylon.StandardMaterial.blockDirtyMechanism

set blockDirtyMechanism(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.blockDirtyMechanism


cameraColorCurves

get cameraColorCurves(): Nullable<ColorCurves>

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.

Returns

Nullable<ColorCurves>

Inherited from

babylon.StandardMaterial.cameraColorCurves

set cameraColorCurves(value): void

The color grading curves provide additional color adjustment 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.

Parameters

NameType
valueNullable<ColorCurves>

Returns

void

Inherited from

babylon.StandardMaterial.cameraColorCurves


cameraColorCurvesEnabled

get cameraColorCurvesEnabled(): boolean

Gets whether the color curves effect is enabled.

Returns

boolean

Inherited from

babylon.StandardMaterial.cameraColorCurvesEnabled

set cameraColorCurvesEnabled(value): void

Sets whether the color curves effect is enabled.

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.cameraColorCurvesEnabled


cameraColorGradingEnabled

get cameraColorGradingEnabled(): boolean

Gets whether the color grading effect is enabled.

Returns

boolean

Inherited from

babylon.StandardMaterial.cameraColorGradingEnabled

set cameraColorGradingEnabled(value): void

Gets whether the color grading effect is enabled.

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.cameraColorGradingEnabled


cameraColorGradingTexture

get cameraColorGradingTexture(): Nullable<BaseTexture>

Gets the Color Grading 2D Lookup Texture.

Returns

Nullable<BaseTexture>

Inherited from

babylon.StandardMaterial.cameraColorGradingTexture

set cameraColorGradingTexture(value): void

Sets the Color Grading 2D Lookup Texture.

Parameters

NameType
valueNullable<BaseTexture>

Returns

void

Inherited from

babylon.StandardMaterial.cameraColorGradingTexture


cameraContrast

get cameraContrast(): number

Gets The camera contrast used on this material.

Returns

number

Inherited from

babylon.StandardMaterial.cameraContrast

set cameraContrast(value): void

Sets The camera contrast used on this material.

Parameters

NameType
valuenumber

Returns

void

Inherited from

babylon.StandardMaterial.cameraContrast


cameraExposure

get cameraExposure(): number

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.

Returns

number

Inherited from

babylon.StandardMaterial.cameraExposure

set cameraExposure(value): void

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.

Parameters

NameType
valuenumber

Returns

void

Inherited from

babylon.StandardMaterial.cameraExposure


cameraToneMappingEnabled

get cameraToneMappingEnabled(): boolean

Gets whether tonemapping is enabled or not.

Returns

boolean

Inherited from

babylon.StandardMaterial.cameraToneMappingEnabled

set cameraToneMappingEnabled(value): void

Sets whether tonemapping is enabled or not

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.cameraToneMappingEnabled


canRenderToMRT

get canRenderToMRT(): boolean

Can this material render to several textures at once

Returns

boolean

Inherited from

babylon.StandardMaterial.canRenderToMRT


cullBackFaces

get cullBackFaces(): boolean

Gets the type of faces that should be culled

Returns

boolean

Inherited from

babylon.StandardMaterial.cullBackFaces

set cullBackFaces(value): void

Sets the type of faces that should be culled (true for back faces, false for front faces)

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.cullBackFaces


fillMode

get fillMode(): number

Gets the material fill mode

Returns

number

Inherited from

babylon.StandardMaterial.fillMode

set fillMode(value): void

Sets the material fill mode

Parameters

NameType
valuenumber

Returns

void

Inherited from

babylon.StandardMaterial.fillMode


fogEnabled

get fogEnabled(): boolean

Gets the value of the fog enabled state

Returns

boolean

Inherited from

babylon.StandardMaterial.fogEnabled

set fogEnabled(value): void

Sets the state for enabling fog

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.fogEnabled


hasRenderTargetTextures

get hasRenderTargetTextures(): boolean

Gets a boolean indicating that current material needs to register RTT

Returns

boolean

Inherited from

babylon.StandardMaterial.hasRenderTargetTextures


imageProcessingConfiguration

get imageProcessingConfiguration(): ImageProcessingConfiguration

Gets the image processing configuration used either in this material.

Returns

ImageProcessingConfiguration

Inherited from

babylon.StandardMaterial.imageProcessingConfiguration

set imageProcessingConfiguration(value): void

Sets the Default image processing configuration used either in the this material.

If sets to null, the scene one is in use.

Parameters

NameType
valueImageProcessingConfiguration

Returns

void

Inherited from

babylon.StandardMaterial.imageProcessingConfiguration


isFrozen

get isFrozen(): boolean

Specifies if updates for the material been locked

Returns

boolean

Inherited from

babylon.StandardMaterial.isFrozen


isPrePassCapable

get isPrePassCapable(): boolean

Can this material render to prepass

Returns

boolean

Inherited from

babylon.StandardMaterial.isPrePassCapable


needDepthPrePass

get needDepthPrePass(): boolean

Gets the depth pre-pass value

Returns

boolean

Inherited from

babylon.StandardMaterial.needDepthPrePass

set needDepthPrePass(value): void

Sets the need depth pre-pass value

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.needDepthPrePass


onBind

set onBind(callback): void

Called during a bind event

Parameters

NameType
callback(Mesh: AbstractMesh) => void

Returns

void

Inherited from

babylon.StandardMaterial.onBind


onBindObservable

get onBindObservable(): Observable<AbstractMesh>

An event triggered when the material is bound

Returns

Observable<AbstractMesh>

Inherited from

babylon.StandardMaterial.onBindObservable


onDispose

set onDispose(callback): void

Called during a dispose event

Parameters

NameType
callback() => void

Returns

void

Inherited from

babylon.StandardMaterial.onDispose


onEffectCreatedObservable

get onEffectCreatedObservable(): Observable<{ effect: Effect ; subMesh: Nullable<SubMesh> }>

An event triggered when the effect is (re)created

Returns

Observable<{ effect: Effect ; subMesh: Nullable<SubMesh> }>

Inherited from

babylon.StandardMaterial.onEffectCreatedObservable


onUnBindObservable

get onUnBindObservable(): Observable<Material>

An event triggered when the material is unbound

Returns

Observable<Material>

Inherited from

babylon.StandardMaterial.onUnBindObservable


pointsCloud

get pointsCloud(): boolean

Gets the value specifying if point clouds are enabled

Returns

boolean

Inherited from

babylon.StandardMaterial.pointsCloud

set pointsCloud(value): void

Sets the state of point cloud mode

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.pointsCloud


transparencyMode

get transparencyMode(): Nullable<number>

Gets the current transparency mode.

Returns

Nullable<number>

Inherited from

babylon.StandardMaterial.transparencyMode

set transparencyMode(value): void

Sets the transparency mode of the material.

ValueTypeDescription
0OPAQUE
1ALPHATEST
2ALPHABLEND
3ALPHATESTANDBLEND

Parameters

NameType
valueNullable<number>

Returns

void

Inherited from

babylon.StandardMaterial.transparencyMode


useLogarithmicDepth

get useLogarithmicDepth(): boolean

In case the depth buffer does not allow enough depth precision for your scene (might be the case in large scenes) You can try switching to logarithmic depth.

See

https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/logarithmicDepthBuffer

Returns

boolean

Inherited from

babylon.StandardMaterial.useLogarithmicDepth

set useLogarithmicDepth(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.useLogarithmicDepth


wireframe

get wireframe(): boolean

Returns

boolean

Inherited from

babylon.StandardMaterial.wireframe

set wireframe(value): void

Sets the state of wireframe mode

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.wireframe


AmbientTextureEnabled

Static get AmbientTextureEnabled(): boolean

Are ambient textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.AmbientTextureEnabled

Static set AmbientTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.AmbientTextureEnabled


BumpTextureEnabled

Static get BumpTextureEnabled(): boolean

Are bump textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.BumpTextureEnabled

Static set BumpTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.BumpTextureEnabled


ColorGradingTextureEnabled

Static get ColorGradingTextureEnabled(): boolean

Are color grading textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.ColorGradingTextureEnabled

Static set ColorGradingTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.ColorGradingTextureEnabled


DetailTextureEnabled

Static get DetailTextureEnabled(): boolean

Are detail textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.DetailTextureEnabled

Static set DetailTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.DetailTextureEnabled


DiffuseTextureEnabled

Static get DiffuseTextureEnabled(): boolean

Are diffuse textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.DiffuseTextureEnabled

Static set DiffuseTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.DiffuseTextureEnabled


EmissiveTextureEnabled

Static get EmissiveTextureEnabled(): boolean

Are emissive textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.EmissiveTextureEnabled

Static set EmissiveTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.EmissiveTextureEnabled


FresnelEnabled

Static get FresnelEnabled(): boolean

Are fresnels enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.FresnelEnabled

Static set FresnelEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.FresnelEnabled


LightmapTextureEnabled

Static get LightmapTextureEnabled(): boolean

Are lightmap textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.LightmapTextureEnabled

Static set LightmapTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.LightmapTextureEnabled


OpacityTextureEnabled

Static get OpacityTextureEnabled(): boolean

Are opacity textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.OpacityTextureEnabled

Static set OpacityTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.OpacityTextureEnabled


ReflectionTextureEnabled

Static get ReflectionTextureEnabled(): boolean

Are reflection textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.ReflectionTextureEnabled

Static set ReflectionTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.ReflectionTextureEnabled


RefractionTextureEnabled

Static get RefractionTextureEnabled(): boolean

Are refraction textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.RefractionTextureEnabled

Static set RefractionTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.RefractionTextureEnabled


SpecularTextureEnabled

Static get SpecularTextureEnabled(): boolean

Are specular textures enabled in the application.

Returns

boolean

Inherited from

babylon.StandardMaterial.SpecularTextureEnabled

Static set SpecularTextureEnabled(value): void

Parameters

NameType
valueboolean

Returns

void

Inherited from

babylon.StandardMaterial.SpecularTextureEnabled

Methods

_afterBind

Protected _afterBind(mesh?, effect?): void

Parameters

NameType
mesh?Mesh
effect?Nullable<Effect>

Returns

void

Inherited from

babylon.StandardMaterial._afterBind


_attachImageProcessingConfiguration

Protected _attachImageProcessingConfiguration(configuration): void

Attaches a new image processing configuration to the Standard Material.

Parameters

NameType
configurationNullable<ImageProcessingConfiguration>

Returns

void

Inherited from

babylon.StandardMaterial._attachImageProcessingConfiguration


_getDrawWrapper

_getDrawWrapper(): DrawWrapper

Returns

DrawWrapper

Inherited from

babylon.StandardMaterial._getDrawWrapper


_hasAlphaChannel

Protected _hasAlphaChannel(): boolean

Specifies whether or not there is a usable alpha channel for transparency.

Returns

boolean

Inherited from

babylon.StandardMaterial._hasAlphaChannel


_isReadyForSubMesh

Protected _isReadyForSubMesh(subMesh): boolean

Parameters

NameType
subMeshSubMesh

Returns

boolean

Inherited from

babylon.StandardMaterial._isReadyForSubMesh


_markAllSubMeshesAsAllDirty

Protected _markAllSubMeshesAsAllDirty(): void

Indicates that we need to re-calculated for all submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsAllDirty


_markAllSubMeshesAsAttributesDirty

Protected _markAllSubMeshesAsAttributesDirty(): void

Indicates that attributes need to be re-calculated for all submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsAttributesDirty


_markAllSubMeshesAsDirty

Protected _markAllSubMeshesAsDirty(func): void

Marks all submeshes of a material to indicate that their material defines need to be re-calculated

Parameters

NameTypeDescription
func(defines: MaterialDefines) => voiddefines a function which checks material defines against the submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsDirty


_markAllSubMeshesAsFresnelAndMiscDirty

Protected _markAllSubMeshesAsFresnelAndMiscDirty(): void

Indicates that fresnel and misc need to be re-calculated for all submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsFresnelAndMiscDirty


_markAllSubMeshesAsFresnelDirty

Protected _markAllSubMeshesAsFresnelDirty(): void

Indicates that fresnel needs to be re-calculated for all submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsFresnelDirty


_markAllSubMeshesAsImageProcessingDirty

Protected _markAllSubMeshesAsImageProcessingDirty(): void

Indicates that image processing needs to be re-calculated for all submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsImageProcessingDirty


_markAllSubMeshesAsLightsDirty

Protected _markAllSubMeshesAsLightsDirty(): void

Indicates that lights need to be re-calculated for all submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsLightsDirty


_markAllSubMeshesAsMiscDirty

Protected _markAllSubMeshesAsMiscDirty(): void

Indicates that misc needs to be re-calculated for all submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsMiscDirty


_markAllSubMeshesAsPrePassDirty

Protected _markAllSubMeshesAsPrePassDirty(): void

Indicates that prepass needs to be re-calculated for all submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsPrePassDirty


_markAllSubMeshesAsTexturesAndMiscDirty

Protected _markAllSubMeshesAsTexturesAndMiscDirty(): void

Indicates that textures and misc need to be re-calculated for all submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsTexturesAndMiscDirty


_markAllSubMeshesAsTexturesDirty

Protected _markAllSubMeshesAsTexturesDirty(): void

Indicates that textures need to be re-calculated for all submeshes

Returns

void

Inherited from

babylon.StandardMaterial._markAllSubMeshesAsTexturesDirty


_markScenePrePassDirty

Protected _markScenePrePassDirty(): void

Indicates that the scene should check if the rendering now needs a prepass

Returns

void

Inherited from

babylon.StandardMaterial._markScenePrePassDirty


_mustRebind

Protected _mustRebind(scene, effect, visibility?): boolean

Parameters

NameType
sceneScene
effectEffect
visibility?number

Returns

boolean

Inherited from

babylon.StandardMaterial._mustRebind


_preBind

_preBind(effect?, overrideOrientation?): boolean

Parameters

NameType
effect?Effect | DrawWrapper
overrideOrientation?Nullable<number>

Returns

boolean

Inherited from

babylon.StandardMaterial._preBind


_setDrawWrapper

_setDrawWrapper(drawWrapper): void

Parameters

NameType
drawWrapperDrawWrapper

Returns

void

Inherited from

babylon.StandardMaterial._setDrawWrapper


_shouldTurnAlphaTestOn

Protected _shouldTurnAlphaTestOn(mesh): boolean

Specifies if material alpha testing should be turned on for the mesh

Parameters

NameTypeDescription
meshAbstractMeshdefines the mesh to check

Returns

boolean

Inherited from

babylon.StandardMaterial._shouldTurnAlphaTestOn


_shouldUseAlphaFromDiffuseTexture

Protected _shouldUseAlphaFromDiffuseTexture(): boolean

Specifies whether or not the alpha value of the diffuse texture should be used for alpha blending.

Returns

boolean

Inherited from

babylon.StandardMaterial._shouldUseAlphaFromDiffuseTexture


atomicMaterialsUpdate

atomicMaterialsUpdate(callback): void

This allows you to modify the material without marking it as dirty after every change. This function should be used if you need to make more than one dirty-enabling change to the material - adding a texture, setting a new fill mode and so on. The callback will pass the material as an argument, so you can make your changes to it.

Parameters

NameTypeDescription
callback(material: OccluderMaterial) => voidthe callback to be executed that will update the material

Returns

void

Inherited from

babylon.StandardMaterial.atomicMaterialsUpdate


bind

bind(world, mesh?): void

Parameters

NameType
worldMatrix
mesh?Mesh

Returns

void

Inherited from

babylon.StandardMaterial.bind


bindEyePosition

bindEyePosition(effect, variableName?): void

Binds the view matrix to the effect

Parameters

NameTypeDescription
effectEffectdefines the effect to bind the view matrix to
variableName?stringname of the shader variable that will hold the eye position

Returns

void

Inherited from

babylon.StandardMaterial.bindEyePosition


bindForSubMesh

bindForSubMesh(world, mesh, subMesh): void

Binds the submesh to this material by preparing the effect and shader to draw

Parameters

NameTypeDescription
worldMatrixdefines the world transformation matrix
meshMeshdefines the mesh containing the submesh
subMeshSubMeshdefines the submesh to bind the material to

Returns

void

Inherited from

babylon.StandardMaterial.bindForSubMesh


bindOnlyNormalMatrix

bindOnlyNormalMatrix(normalMatrix): void

Binds the given normal matrix to the active effect

Parameters

NameTypeDescription
normalMatrixMatrixthe matrix to bind

Returns

void

Inherited from

babylon.StandardMaterial.bindOnlyNormalMatrix


bindOnlyWorldMatrix

bindOnlyWorldMatrix(world): void

Binds the given world matrix to the active effect

Parameters

NameTypeDescription
worldMatrixthe matrix to bind

Returns

void

Inherited from

babylon.StandardMaterial.bindOnlyWorldMatrix


bindView

bindView(effect): void

Binds the view matrix to the effect

Parameters

NameTypeDescription
effectEffectdefines the effect to bind the view matrix to

Returns

void

Inherited from

babylon.StandardMaterial.bindView


bindViewProjection

bindViewProjection(effect): void

Binds the view projection and projection matrices to the effect

Parameters

NameTypeDescription
effectEffectdefines the effect to bind the view projection and projection matrices to

Returns

void

Inherited from

babylon.StandardMaterial.bindViewProjection


buildUniformLayout

buildUniformLayout(): void

Builds the material UBO layouts. Used internally during the effect preparation.

Returns

void

Inherited from

babylon.StandardMaterial.buildUniformLayout


clone

clone(name): StandardMaterial

Makes a duplicate of the material, and gives it a new name

Parameters

NameTypeDescription
namestringdefines the new name for the duplicated material

Returns

StandardMaterial

the cloned material

Inherited from

babylon.StandardMaterial.clone


dispose

dispose(forceDisposeEffect?, forceDisposeTextures?): void

Disposes the material

Parameters

NameTypeDescription
forceDisposeEffect?booleanspecifies if effects should be forcefully disposed
forceDisposeTextures?booleanspecifies if textures should be forcefully disposed

Returns

void

Inherited from

babylon.StandardMaterial.dispose


forceCompilation

forceCompilation(mesh, onCompiled?, options?, onError?): void

Force shader compilation

Parameters

NameTypeDescription
meshAbstractMeshdefines the mesh associated with this material
onCompiled?(material: Material) => voiddefines a function to execute once the material is compiled
options?Partial<IMaterialCompilationOptions>defines the options to configure the compilation
onError?(reason: string) => voiddefines a function to execute if the material fails compiling

Returns

void

Inherited from

babylon.StandardMaterial.forceCompilation


forceCompilationAsync

forceCompilationAsync(mesh, options?): Promise<void>

Force shader compilation

Parameters

NameTypeDescription
meshAbstractMeshdefines the mesh that will use this material
options?Partial<IMaterialCompilationOptions>defines additional options for compiling the shaders

Returns

Promise<void>

a promise that resolves when the compilation completes

Inherited from

babylon.StandardMaterial.forceCompilationAsync


freeze

freeze(): void

Locks updates for the material

Returns

void

Inherited from

babylon.StandardMaterial.freeze


getActiveTextures

getActiveTextures(): BaseTexture[]

Gets the active textures from the material

Returns

BaseTexture[]

an array of textures

Inherited from

babylon.StandardMaterial.getActiveTextures


getAlphaTestTexture

getAlphaTestTexture(): Nullable<BaseTexture>

Get the texture used for alpha test purpose.

Returns

Nullable<BaseTexture>

the diffuse texture in case of the standard material.

Inherited from

babylon.StandardMaterial.getAlphaTestTexture


getAnimatables

getAnimatables(): IAnimatable[]

Get the list of animatables in the material.

Returns

IAnimatable[]

the list of animatables object used in the material

Inherited from

babylon.StandardMaterial.getAnimatables


getBindedMeshes

getBindedMeshes(): AbstractMesh[]

Gets the meshes bound to the material

Returns

AbstractMesh[]

an array of meshes bound to the material

Inherited from

babylon.StandardMaterial.getBindedMeshes


getClassName

getClassName(): string

Gets the current class name of the material e.g. "StandardMaterial" Mainly use in serialization.

Returns

string

the class name

Inherited from

babylon.StandardMaterial.getClassName


getEffect

getEffect(): Effect

Returns

Effect

Inherited from

babylon.StandardMaterial.getEffect


getScene

getScene(): Scene

Returns the current scene

Returns

Scene

a Scene

Inherited from

babylon.StandardMaterial.getScene


hasTexture

hasTexture(texture): boolean

Specifies if the material uses a texture

Parameters

NameTypeDescription
textureBaseTexturedefines the texture to check against the material

Returns

boolean

a boolean specifying if the material uses the texture

Inherited from

babylon.StandardMaterial.hasTexture


isReady

isReady(mesh?, useInstances?): boolean

Parameters

NameType
mesh?AbstractMesh
useInstances?boolean

Returns

boolean

Inherited from

babylon.StandardMaterial.isReady


isReadyForSubMesh

isReadyForSubMesh(mesh, subMesh, useInstances?): boolean

Get if the submesh is ready to be used and all its information available. Child classes can use it to update shaders

Parameters

NameTypeDescription
meshAbstractMeshdefines the mesh to check
subMeshSubMeshdefines which submesh to check
useInstances?booleanspecifies that instances should be used

Returns

boolean

a boolean indicating that the submesh is ready or not

Inherited from

babylon.StandardMaterial.isReadyForSubMesh


markAsDirty

markAsDirty(flag): void

Marks a define in the material to indicate that it needs to be re-computed

Parameters

NameTypeDescription
flagnumberdefines a flag used to determine which parts of the material have to be marked as dirty

Returns

void

Inherited from

babylon.StandardMaterial.markAsDirty


markDirty

markDirty(): void

Marks the material to indicate that it needs to be re-calculated

Returns

void

Inherited from

babylon.StandardMaterial.markDirty


needAlphaBlending

needAlphaBlending(): boolean

Specifies if the material will require alpha blending

Returns

boolean

a boolean specifying if alpha blending is needed

Inherited from

babylon.StandardMaterial.needAlphaBlending


needAlphaBlendingForMesh

needAlphaBlendingForMesh(mesh): boolean

Specifies if the mesh will require alpha blending

Parameters

NameTypeDescription
meshAbstractMeshdefines the mesh to check

Returns

boolean

a boolean specifying if alpha blending is needed for the mesh

Inherited from

babylon.StandardMaterial.needAlphaBlendingForMesh


needAlphaTesting

needAlphaTesting(): boolean

Specifies if this material should be rendered in alpha test mode

Returns

boolean

a boolean specifying if an alpha test is needed.

Inherited from

babylon.StandardMaterial.needAlphaTesting


resetDrawCache

resetDrawCache(): void

Resets the draw wrappers cache for all submeshes that are using this material

Returns

void

Inherited from

babylon.StandardMaterial.resetDrawCache


serialize

serialize(): any

Serializes this material

Returns

any

the serialized material object

Inherited from

babylon.StandardMaterial.serialize


setPrePassRenderer

setPrePassRenderer(prePassRenderer): boolean

Sets the required values to the prepass renderer.

Parameters

NameTypeDescription
prePassRendererPrePassRendererdefines the prepass renderer to setup.

Returns

boolean

true if the pre pass is needed.

Inherited from

babylon.StandardMaterial.setPrePassRenderer


toString

toString(fullDetails?): string

Returns a string representation of the current material

Parameters

NameTypeDescription
fullDetails?booleandefines a boolean indicating which levels of logging is desired

Returns

string

a string with material information

Inherited from

babylon.StandardMaterial.toString


unbind

unbind(): void

Unbinds the material from the mesh

Returns

void

Inherited from

babylon.StandardMaterial.unbind


unfreeze

unfreeze(): void

Unlocks updates for the material

Returns

void

Inherited from

babylon.StandardMaterial.unfreeze


Parse

Static Parse(source, scene, rootUrl): StandardMaterial

Creates a standard material from parsed material data

Parameters

NameTypeDescription
sourceanydefines the JSON representation of the material
sceneScenedefines the hosting scene
rootUrlstringdefines the root URL to use to load textures and relative dependencies

Returns

StandardMaterial

a new standard material

Inherited from

babylon.StandardMaterial.Parse