Home Reference Source
import {OverrideMaterialManager} from 'postprocessing'
public class | source

OverrideMaterialManager

Implements:

An override material manager.

Includes a workaround that fixes override materials for skinned meshes and instancing. Doesn't fix uniforms such as normal maps and displacement maps. Using the workaround may have a negative impact on performance if the scene contains a lot of meshes.

Static Member Summary

Static Public Members
public static get

Indicates whether the override material workaround is enabled.

public static set

Enables or disables the override material workaround globally.

Constructor Summary

Public Constructor
public

constructor(material: Material)

Constructs a new override material manager.

Method Summary

Public Methods
public

Performs cleanup tasks.

public

setMaterial(material: Material)

Sets the override material.

Static Public Members

public static get workaroundEnabled: Boolean source

Indicates whether the override material workaround is enabled.

public static set workaroundEnabled: Boolean source

Enables or disables the override material workaround globally.

This only affects post processing passes and effects.

Public Constructors

public constructor(material: Material) source

Constructs a new override material manager.

Params:

NameTypeAttributeDescription
material Material
  • optional
  • default: null

An override material.

Public Methods

public dispose() source

Performs cleanup tasks.

public setMaterial(material: Material) source

Sets the override material.

Params:

NameTypeAttributeDescription
material Material

The material.