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

BoxBlurMaterial

Extends:

three~ShaderMaterial → BoxBlurMaterial

Implements:

A fast box blur material that supports depth-based bilateral filtering.

Constructor Summary

Public Constructor
public

constructor(options: Object)

Constructs a new box blur material.

Member Summary

Public Members
public get

Indicates whether bilateral filtering is enabled.

public set
public set

depthBuffer: Texture

The depth buffer.

public set

depthPacking: DepthPackingStrategies

The depth packing strategy.

public set

inputBuffer: Texture

The input buffer.

public get

The kernel size.

public set
public set

The maximum amount of varying vectors.

public
public set

A combined normal-depth buffer.

public get

The blur scale.

public set
public get

The bilateral filter distance threshold in world units.

public set

Method Summary

Public Methods
public

copyCameraSettings(camera: Camera)

Copies the settings of the given camera.

public

setSize(width: Number, height: Number)

Sets the size of this object.

Public Constructors

public constructor(options: Object) source

Constructs a new box blur material.

Params:

NameTypeAttributeDescription
options Object
  • optional

The options.

options.bilateral Number
  • optional
  • default: false

Enables or disables bilateral blurring.

options.kernelSize Number
  • optional
  • default: 5

The kernel size.

Public Members

public get bilateral: Boolean source

Indicates whether bilateral filtering is enabled.

public set bilateral source

public set depthBuffer: Texture source

The depth buffer.

public set depthPacking: DepthPackingStrategies source

The depth packing strategy.

public set inputBuffer: Texture source

The input buffer.

public get kernelSize: Number source

The kernel size.

  • Must be an odd number
  • Kernel size 3 and 5 use optimized code paths
  • Default is 5

public set kernelSize source

public set maxVaryingVectors: Number source

The maximum amount of varying vectors.

Should be synced with renderer.capabilities.maxVaryings. Default is 8.

public needsUpdate: boolean source

public set normalDepthBuffer: Texture source

A combined normal-depth buffer. Overrides depthBuffer if set.

public get scale: Number source

The blur scale.

public set scale source

public get worldDistanceThreshold: Number source

The bilateral filter distance threshold in world units.

public set worldDistanceThreshold source

Public Methods

public copyCameraSettings(camera: Camera) source

Copies the settings of the given camera.

Params:

NameTypeAttributeDescription
camera Camera

A camera.

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

Sets the size of this object.

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.