Blender V4.3
workbench_effect_dof.cc File Reference
#include "workbench_private.hh"
#include "BKE_camera.h"
#include "DEG_depsgraph_query.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 
namespace  blender::workbench
 

Functions

static void blender::workbench::square_to_circle (float x, float y, float &r, float &T)
 

Detailed Description

Depth of Field Effect:

We use a gather approach by sampling a lowres version of the color buffer. The process can be summarized like this:

  • down-sample the color buffer using a COC (Circle of Confusion) aware down-sample algorithm.
  • do a gather pass using the COC computed in the previous pass.
  • do a median filter to reduce noise amount.
  • composite on top of main color buffer.

This is done after all passes and affects every surfaces.

Definition in file workbench_effect_dof.cc.