Home Reference Source

Variable

Static Public Summary
public

A blend function enumeration.

public

An enumeration of effect attributes.

public

A glitch mode enumeration.

public

A kernel size enumeration.

public

An enumeration of shader code placeholders.

public

An enumeration of WebGL extensions.

Static Public

public BlendFunction: Object source

A blend function enumeration.

Properties:

NameTypeAttributeDescription
SKIP Number

No blending. The effect will not be included in the final shader.

ADD Number

Additive blending. Fast, but may produce washed out results.

ALPHA Number

Alpha blending. Blends based on the alpha value of the new color. Opacity will be ignored.

AVERAGE Number

Average blending.

COLOR_BURN Number

Color dodge.

COLOR_DODGE Number

Color burn.

DARKEN Number

Prioritize darker colors.

DIFFERENCE Number

Color difference.

EXCLUSION Number

Color exclusion.

LIGHTEN Number

Prioritize lighter colors.

MULTIPLY Number

Color multiplication.

DIVIDE Number

Color division.

NEGATION Number

Color negation.

NORMAL Number

Normal blending. The new color overwrites the old one.

OVERLAY Number

Color overlay.

REFLECT Number

Color reflection.

SCREEN Number

Screen blending. The two colors are effectively projected on a white screen simultaneously.

SOFT_LIGHT Number

Soft light blending.

SUBTRACT Number

Color subtraction.

public EffectAttribute: Object source

import {EffectAttribute} from 'postprocessing/src/effects/Effect.js'

An enumeration of effect attributes.

Attributes can be concatenated using the bitwise OR operator.

Properties:

NameTypeAttributeDescription
CONVOLUTION Number

Describes effects that fetch additional samples from the input buffer. There cannot be more than one effect with this attribute per EffectPass.

DEPTH Number

Describes effects that require a depth texture.

NONE Number

No attributes. Most effects don't need to specify any attributes.

Example:

const attributes = EffectAttribute.CONVOLUTION | EffectAttribute.DEPTH;

public GlitchMode: Object source

A glitch mode enumeration.

Properties:

NameTypeAttributeDescription
DISABLED Number

No glitches.

SPORADIC Number

Sporadic glitches.

CONSTANT_MILD Number

Constant mild glitches.

CONSTANT_WILD Number

Constant wild glitches.

public KernelSize: Object source

A kernel size enumeration.

Properties:

NameTypeAttributeDescription
VERY_SMALL Number

A very small kernel that matches a 7x7 Gauss blur kernel.

SMALL Number

A small kernel that matches a 15x15 Gauss blur kernel.

MEDIUM Number

A medium sized kernel that matches a 23x23 Gauss blur kernel.

LARGE Number

A large kernel that matches a 35x35 Gauss blur kernel.

VERY_LARGE Number

A very large kernel that matches a 63x63 Gauss blur kernel.

HUGE Number

A huge kernel that matches a 127x127 Gauss blur kernel.

public Section: Object source

An enumeration of shader code placeholders.

Properties:

NameTypeAttributeDescription
FRAGMENT_HEAD String

A placeholder for function and variable declarations inside the fragment shader.

FRAGMENT_MAIN_UV String

A placeholder for UV transformations inside the fragment shader.

FRAGMENT_MAIN_IMAGE String

A placeholder for color calculations inside the fragment shader.

VERTEX_HEAD String

A placeholder for function and variable declarations inside the vertex shader.

VERTEX_MAIN_SUPPORT String

A placeholder for supporting calculations inside the vertex shader.

public WebGLExtension: Object source

import {WebGLExtension} from 'postprocessing/src/effects/Effect.js'

An enumeration of WebGL extensions.

Properties:

NameTypeAttributeDescription
DERIVATIVES String

Enables derivatives by adding the functions dFdx, dFdy and fwidth.

FRAG_DEPTH String

Enables gl_FragDepthEXT to set a depth value of a fragment from within the fragment shader.

DRAW_BUFFERS String

Enables multiple render targets (MRT) support.

SHADER_TEXTURE_LOD String

Enables explicit control of texture LOD.