Skip to main content

Class: DVEPBRMaterialPlugin

Defaults/Foundation/PBR/DVEPBRMaterialPlugin.DVEPBRMaterialPlugin

Hierarchy

  • MaterialPluginBase

    DVEPBRMaterialPlugin

Constructors

constructor

new DVEPBRMaterialPlugin(material, name, dveMaterial, onUBSet): DVEPBRMaterialPlugin

Parameters

NameType
materialPBRMaterial
namestring
dveMaterialDVEBRPBRMaterial
onUBSet(uniformBuffer: UniformBuffer) => void

Returns

DVEPBRMaterialPlugin

Overrides

MaterialPluginBase.constructor

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:19

Properties

_material

Protected _material: Material

Inherited from

MaterialPluginBase._material

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:36


_pluginDefineNames

Protected Optional _pluginDefineNames: Object

Index signature

▪ [name: string]: any

Inherited from

MaterialPluginBase._pluginDefineNames

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:38


_pluginManager

Protected _pluginManager: MaterialPluginManager

Inherited from

MaterialPluginBase._pluginManager

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:37


_textureBound

_textureBound: boolean = false

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:125


dveMaterial

dveMaterial: DVEBRPBRMaterial

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:22


id

id: `${string}-${string}-${string}-${string}-${string}`

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:18


markAllDefinesAsDirty

Readonly markAllDefinesAsDirty: () => void

Helper function to mark defines as being dirty.

Type declaration

▸ (): void

Returns

void

Inherited from

MaterialPluginBase.markAllDefinesAsDirty

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:45


name

name: string

Defines the name of the plugin

Inherited from

MaterialPluginBase.name

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:23


onUBSet

onUBSet: (uniformBuffer: UniformBuffer) => void

Type declaration

▸ (uniformBuffer): void

Parameters
NameType
uniformBufferUniformBuffer
Returns

void

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:23


priority

priority: number

Defines the priority of the plugin. Lower numbers run first.

Inherited from

MaterialPluginBase.priority

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:27


registerForExtraEvents

registerForExtraEvents: boolean

Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)

Inherited from

MaterialPluginBase.registerForExtraEvents

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:35


resolveIncludes

resolveIncludes: boolean

Indicates that any #include directive in the plugin code must be replaced by the corresponding code.

Inherited from

MaterialPluginBase.resolveIncludes

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:31


uniformBuffer

uniformBuffer: UniformBuffer

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:16

Methods

_enable

_enable(enable): void

Parameters

NameType
enableboolean

Returns

void

Inherited from

MaterialPluginBase._enable

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:41


addFallbacks

addFallbacks(defines, fallbacks, currentRank): number

Add fallbacks to the effect fallbacks list.

Parameters

NameTypeDescription
definesMaterialDefinesdefines the Base texture to use.
fallbacksEffectFallbacksdefines the current fallback list.
currentRanknumberdefines the current fallback rank.

Returns

number

the new fallback rank.

Inherited from

MaterialPluginBase.addFallbacks

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:162


bindForSubMesh

bindForSubMesh(uniformBuffer, scene, engine): void

Parameters

NameType
uniformBufferUniformBuffer
sceneScene
engineEngine

Returns

void

Overrides

MaterialPluginBase.bindForSubMesh

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:126


collectDefines

collectDefines(defines): void

Collects all defines.

Parameters

NameTypeDescription
definesObjectThe object to append to.

Returns

void

Inherited from

MaterialPluginBase.collectDefines

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:109


copyTo

copyTo(plugin): void

Makes a duplicate of the current configuration into another one.

Parameters

NameTypeDescription
pluginMaterialPluginBasedefine the config where to copy the info

Returns

void

Inherited from

MaterialPluginBase.copyTo

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:198


dispose

dispose(forceDisposeTextures?): void

Disposes the resources of the material.

Parameters

NameTypeDescription
forceDisposeTextures?booleanForces the disposal of all textures.

Returns

void

Inherited from

MaterialPluginBase.dispose

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:93


fillRenderTargetTextures

fillRenderTargetTextures(renderTargets): void

Fills the list of render target textures.

Parameters

NameTypeDescription
renderTargetsSmartArray<RenderTargetTexture>the list of render targets to update

Returns

void

Inherited from

MaterialPluginBase.fillRenderTargetTextures

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:144


getActiveTextures

getActiveTextures(activeTextures): void

Returns an array of the actively used textures.

Parameters

NameTypeDescription
activeTexturesBaseTexture[]Array of BaseTextures

Returns

void

Inherited from

MaterialPluginBase.getActiveTextures

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:149


getAnimatables

getAnimatables(animatables): void

Returns the animatable textures.

Parameters

NameTypeDescription
animatablesIAnimatable[]Array of animatable textures.

Returns

void

Inherited from

MaterialPluginBase.getAnimatables

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:154


getAttributes

getAttributes(attributes): void

Parameters

NameType
attributesstring[]

Returns

void

Overrides

MaterialPluginBase.getAttributes

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:63


getClassName

getClassName(): string

Returns

string

Overrides

MaterialPluginBase.getClassName

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:53


getCustomCode

getCustomCode(shaderType): null | { CUSTOM_FRAGMENT_BEFORE_FINALCOLORCOMPOSITION?: undefined ; CUSTOM_FRAGMENT_DEFINITIONS?: undefined ; CUSTOM_FRAGMENT_MAIN_END?: undefined ; CUSTOM_FRAGMENT_UPDATE_ALBEDO?: undefined ; CUSTOM_VERTEX_DEFINITIONS: string ; CUSTOM_VERTEX_MAIN_BEGIN: string ; CUSTOM_VERTEX_UPDATE_NORMAL: string } | { CUSTOM_FRAGMENT_BEFORE_FINALCOLORCOMPOSITION: string ; CUSTOM_FRAGMENT_DEFINITIONS: string ; CUSTOM_FRAGMENT_MAIN_END: string ; CUSTOM_FRAGMENT_UPDATE_ALBEDO: string ; CUSTOM_VERTEX_DEFINITIONS?: undefined ; CUSTOM_VERTEX_MAIN_BEGIN?: undefined ; CUSTOM_VERTEX_UPDATE_NORMAL?: undefined }

Parameters

NameType
shaderTypeany

Returns

null | { CUSTOM_FRAGMENT_BEFORE_FINALCOLORCOMPOSITION?: undefined ; CUSTOM_FRAGMENT_DEFINITIONS?: undefined ; CUSTOM_FRAGMENT_MAIN_END?: undefined ; CUSTOM_FRAGMENT_UPDATE_ALBEDO?: undefined ; CUSTOM_VERTEX_DEFINITIONS: string ; CUSTOM_VERTEX_MAIN_BEGIN: string ; CUSTOM_VERTEX_UPDATE_NORMAL: string } | { CUSTOM_FRAGMENT_BEFORE_FINALCOLORCOMPOSITION: string ; CUSTOM_FRAGMENT_DEFINITIONS: string ; CUSTOM_FRAGMENT_MAIN_END: string ; CUSTOM_FRAGMENT_UPDATE_ALBEDO: string ; CUSTOM_VERTEX_DEFINITIONS?: undefined ; CUSTOM_VERTEX_MAIN_BEGIN?: undefined ; CUSTOM_VERTEX_UPDATE_NORMAL?: undefined }

Overrides

MaterialPluginBase.getCustomCode

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:132


getSamplers

getSamplers(samplers): void

Parameters

NameType
samplersstring[]

Returns

void

Overrides

MaterialPluginBase.getSamplers

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:57


getUniformBuffersNames

getUniformBuffersNames(ubos): void

Gets the uniform buffers names added by the plugin.

Parameters

NameTypeDescription
ubosstring[]list that the ubo names should be added to.

Returns

void

Inherited from

MaterialPluginBase.getUniformBuffersNames

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:179


getUniforms

getUniforms(): Object

Returns

Object

NameType
fragmentstring
ubo{ arraySize?: number ; name: string ; size?: number ; type: string }[]
vertexstring

Overrides

MaterialPluginBase.getUniforms

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:71


hardBindForSubMesh

hardBindForSubMesh(uniformBuffer, scene, engine, subMesh): void

Binds the material data (this function is called even if mustRebind() returns false)

Parameters

NameTypeDescription
uniformBufferUniformBufferdefines the Uniform buffer to fill in.
sceneScenedefines the scene the material belongs to.
engineEnginedefines the engine the material belongs to.
subMeshSubMeshthe submesh to bind data for

Returns

void

Inherited from

MaterialPluginBase.hardBindForSubMesh

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:80


hasRenderTargetTextures

hasRenderTargetTextures(): boolean

Gets a boolean indicating that current material needs to register RTT

Returns

boolean

true if this uses a render target otherwise false.

Inherited from

MaterialPluginBase.hasRenderTargetTextures

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:139


hasTexture

hasTexture(texture): boolean

Parameters

NameType
textureBaseTexture

Returns

boolean

Overrides

MaterialPluginBase.hasTexture

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:35


isReadyForSubMesh

isReadyForSubMesh(defines, scene, engine, subMesh): boolean

Specifies that the submesh is ready to be used.

Parameters

NameTypeDescription
definesMaterialDefinesthe list of "defines" to update.
sceneScenedefines the scene the material belongs to.
engineEnginethe engine this scene belongs to.
subMeshSubMeshthe submesh to check for readiness

Returns

boolean

  • boolean indicating that the submesh is ready or not.

Inherited from

MaterialPluginBase.isReadyForSubMesh

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:72


parse

parse(source, scene, rootUrl): void

Parses a plugin configuration from a serialized object.

Parameters

NameTypeDescription
sourceanySerialized object.
sceneSceneDefines the scene we are parsing for
rootUrlstringDefines the rootUrl to load from

Returns

void

Inherited from

MaterialPluginBase.parse

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:210


prepareDefines

prepareDefines(defines): void

Parameters

NameType
definesany

Returns

void

Overrides

MaterialPluginBase.prepareDefines

Defined in

divinevoxel/babylon-renderer/src/Defaults/Foundation/PBR/DVEPBRMaterialPlugin.ts:49


prepareDefinesBeforeAttributes

prepareDefinesBeforeAttributes(defines, scene, mesh): void

Sets the defines for the next rendering. Called before PrepareDefinesForAttributes is called.

Parameters

NameTypeDescription
definesMaterialDefinesthe list of "defines" to update.
sceneScenedefines the scene to the material belongs to.
meshAbstractMeshthe mesh being rendered

Returns

void

Inherited from

MaterialPluginBase.prepareDefinesBeforeAttributes

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:121


serialize

serialize(): any

Serializes this plugin configuration.

Returns

any

  • An object with the serialized config.

Inherited from

MaterialPluginBase.serialize

Defined in

node_modules/@babylonjs/core/Materials/materialPluginBase.d.ts:203