📄 threejs/Addons/Shaders/module-BokehShader2

File: module-BokehShader2.md | Updated: 11/15/2025


title: module-BokehShader2 category: Unknown layout: docs

BokehShader2

Import

BokehShader2 is an addon, and must be imported explicitly, see Installation#Addons.

import { BokehShader, BokehDepthShader } from 'three/addons/shaders/BokehShader2.js';

Properties

.BokehShader : ShaderMaterial~Shader (inner, constant)

Depth-of-field shader with bokeh ported from GLSL shader by Martins Upitis.

Requires #define RINGS and SAMPLES integers

Source

examples/jsm/shaders/BokehShader2.js