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

BokehMaterial

Extends:

three~ShaderMaterial → BokehMaterial

A bokeh blur material.

This material should be applied twice in a row, with fill mode enabled for the second pass.

Enabling the foreground option causes the shader to combine the near and far CoC values around foreground objects.

Constructor Summary

Public Constructor
public

constructor(fill: Boolean, foreground: Boolean)

Constructs a new bokeh material.

Method Summary

Public Methods
public

Sets the texel size.

Public Constructors

public constructor(fill: Boolean, foreground: Boolean) source

Constructs a new bokeh material.

Params:

NameTypeAttributeDescription
fill Boolean
  • optional
  • default: false

Enables or disables the bokeh highlight fill mode.

foreground Boolean
  • optional
  • default: false

Determines whether this material will be applied to foreground colors.

Public Methods

public setTexelSize(x: Number, y: Number) source

Sets the texel size.

Params:

NameTypeAttributeDescription
x Number

The texel width.

y Number

The texel height.