Skip to content

Commit 1d6a96b

Browse files
committed
add description of setDof() in README.md
1 parent 4ec089b commit 1d6a96b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ Methods on `BlurRenderer`:
249249
- `BlurRenderer.prototype.setIntensity(intensity: number)`
250250
- Control the intensity of the blur, between 0 and 1: the lower the intensity, the farther objects have to be from the focal point to be blurred
251251
- Defaults to 0.05
252+
- `BlurRenderer.prototype.setDof(dof: number)`
253+
- Control the depth of field along the z-axis, unsigned number start from 0: the lower the dof, the smaller clear depth range without blur, and the blur amount will start to be gained while the depth is outside the clear range.
254+
- The focal target is located in the centre of the clear range. So assume the focal target's depth value is `z`, then the clear range becomes from `z - dof / 2` to `z + dof / 2`.
255+
- Defaults to 0
252256
- `BlurRenderer.prototype.setSamples(numSamples: number)`
253257
- Control how many random samples to use in the blur shader. More samples will look smoother but is more computationally intensive.
254258
- Defaults to 15

0 commit comments

Comments
 (0)