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

EffectMaterial

Extends:

three~ShaderMaterial → EffectMaterial

Implements:

An effect material for compound shaders. Supports dithering.

Static Member Summary

Static Public Members
public static get
this get was deprecated. Use EffectShaderSection instead.

An enumeration of shader code placeholders.

Constructor Summary

Public Constructor
public

constructor(shaderParts: Map<String, String>, defines: Map<String, String>, uniforms: Map<String, Uniform>, camera: Camera, dithering: Boolean)

Constructs a new effect material.

Member Summary

Public Members
public get

depthBuffer: Texture

The depth buffer.

public set
public get

depthPacking: DepthPackingStrategies

The depth packing strategy.

public set
public get

Indicates whether output encoding is enabled.

public set
public
public
public set

inputBuffer: Texture

The input buffer.

public
public get

The time in seconds.

public set
public

Method Summary

Public Methods
public

adoptCameraSettings(camera: Camera)

this method was deprecated. Use copyCameraSettings instead.

Copies the settings of the given camera.

public

copyCameraSettings(camera: Camera)

Copies the settings of the given camera.

public
this method was deprecated. Use encodeOutput instead.

Indicates whether output encoding is enabled.

public
this method was deprecated. Use setShaderData instead.

Sets the shader macros.

public
this method was deprecated. Use time instead.

Sets the delta time.

public

setDepthBuffer(buffer: Texture, depthPacking: DepthPackingStrategies)

this method was deprecated. Use depthBuffer and depthPacking instead.

Sets the depth buffer.

public
this method was deprecated. Use setShaderData instead.

Sets the required shader extensions.

public

setInputBuffer(value: Texture)

this method was deprecated. Use inputBuffer instead.

Sets the input buffer.

public
this method was deprecated. Use encodeOutput instead.

Enables or disables output encoding.

public

Sets the shader data.

public
this method was deprecated. Use setShaderData instead.

Sets the shader parts.

public

setSize(width: Number, height: Number)

Sets the resolution.

public

setUniforms(uniforms: Map<String, Uniform>): EffectMaterial

this method was deprecated. Use setShaderData instead.

Sets the shader uniforms.

Static Public Members

public static get Section: Object source

this get was deprecated. Use EffectShaderSection instead.

An enumeration of shader code placeholders.

Public Constructors

public constructor(shaderParts: Map<String, String>, defines: Map<String, String>, uniforms: Map<String, Uniform>, camera: Camera, dithering: Boolean) source

Constructs a new effect material.

Params:

NameTypeAttributeDescription
shaderParts Map<String, String>
  • optional

Deprecated. Use setShaderData instead.

defines Map<String, String>
  • optional

Deprecated. Use setShaderData instead.

uniforms Map<String, Uniform>
  • optional

Deprecated. Use setShaderData instead.

camera Camera
  • optional

A camera.

dithering Boolean
  • optional
  • default: false

Deprecated.

Public Members

public get depthBuffer: Texture source

The depth buffer.

public set depthBuffer source

public get depthPacking: DepthPackingStrategies source

The depth packing strategy.

public set depthPacking source

public get encodeOutput: Boolean source

Indicates whether output encoding is enabled.

public set encodeOutput source

public extensions: {} source

public fragmentShader: * source

public set inputBuffer: Texture source

The input buffer.

public needsUpdate: boolean source

public get time: Number source

The time in seconds.

public set time source

public vertexShader: * source

Public Methods

public adoptCameraSettings(camera: Camera) source

this method was deprecated. Use copyCameraSettings instead.

Copies the settings of the given camera.

Params:

NameTypeAttributeDescription
camera Camera

A camera.

public copyCameraSettings(camera: Camera) source

Copies the settings of the given camera.

Params:

NameTypeAttributeDescription
camera Camera

A camera.

public isOutputEncodingEnabled(value: *): Boolean source

this method was deprecated. Use encodeOutput instead.

Indicates whether output encoding is enabled.

Params:

NameTypeAttributeDescription
value *

Return:

Boolean

Whether output encoding is enabled.

public setDefines(defines: Map<String, String>): EffectMaterial source

this method was deprecated. Use setShaderData instead.

Sets the shader macros.

Params:

NameTypeAttributeDescription
defines Map<String, String>

A collection of preprocessor macro definitions.

Return:

EffectMaterial

This material.

public setDeltaTime(value: Number) source

this method was deprecated. Use time instead.

Sets the delta time.

Params:

NameTypeAttributeDescription
value Number

The delta time in seconds.

public setDepthBuffer(buffer: Texture, depthPacking: DepthPackingStrategies) source

this method was deprecated. Use depthBuffer and depthPacking instead.

Sets the depth buffer.

Params:

NameTypeAttributeDescription
buffer Texture

The depth texture.

depthPacking DepthPackingStrategies
  • optional
  • default: BasicDepthPacking

The depth packing strategy.

public setExtensions(extensions: Set<WebGLExtension>): EffectMaterial source

this method was deprecated. Use setShaderData instead.

Sets the required shader extensions.

Params:

NameTypeAttributeDescription
extensions Set<WebGLExtension>

A collection of extensions.

Return:

EffectMaterial

This material.

public setInputBuffer(value: Texture) source

this method was deprecated. Use inputBuffer instead.

Sets the input buffer.

Params:

NameTypeAttributeDescription
value Texture

The input buffer.

public setOutputEncodingEnabled(value: Boolean) source

this method was deprecated. Use encodeOutput instead.

Enables or disables output encoding.

Params:

NameTypeAttributeDescription
value Boolean

Whether output encoding should be enabled.

public setShaderData(data: EffectShaderData): EffectMaterial source

Sets the shader data.

Params:

NameTypeAttributeDescription
data EffectShaderData

The shader data.

Return:

EffectMaterial

This material.

public setShaderParts(shaderParts: Map<String, String>): EffectMaterial source

this method was deprecated. Use setShaderData instead.

Sets the shader parts.

Params:

NameTypeAttributeDescription
shaderParts Map<String, String>

A collection of shader snippets. See EffectShaderSection.

Return:

EffectMaterial

This material.

public setSize(width: Number, height: Number) source

Sets the resolution.

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.

public setUniforms(uniforms: Map<String, Uniform>): EffectMaterial source

this method was deprecated. Use setShaderData instead.

Sets the shader uniforms.

Params:

NameTypeAttributeDescription
uniforms Map<String, Uniform>

A collection of uniforms.

Return:

EffectMaterial

This material.