You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -197,6 +197,81 @@ The library provides a helper that bundles a Framebuffer with a shader that appl
197
197
198
198
Create a blur renderer and draw inside its `draw` callback. When you tell it to `focusHere()`, anything drawn at that transformed position will be in focus. You can use standard p5 `translate` calls to position the focal point.
199
199
200
+
#### Gaussian blur
201
+
202
+
This is likely the best-looking blur renderer, although it uses two render passes. Start by using this one, but look out the other `BlurRenderer` if it's slow.
- Draw the scene defined in the callback with blur
253
+
-`GaussianBlurRenderer.prototype.focusHere()`
254
+
- Tell the renderer what point in space should be in focus. It will move based on any calls to `translate()` or other transformations that you have applied.
- Control the depth of field (dof), which is the distance away from the focal point that is also in focus, from 0 up
261
+
- The lower the dof, the smaller range will be that has no blur. Blur amount will start to accumulate when objects are outside of the dof range
262
+
- The focal target (set by `focusHere`) 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`.
0 commit comments