diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-08 20:46:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-08 20:46:12 +0400 |
commit | 2a78c2d30405d17d804125e903e3fbec0f10d582 (patch) | |
tree | fd4f766bb4710cbbcecbc5c6049a529b8d8312fd /source/blender/compositor/nodes/COM_DefocusNode.cpp | |
parent | bd3ec606517f0ca02d503a1856963b0a2ddc32e1 (diff) |
improvement to the DOF node, after blurring the radius buffer (derived from the depth), overlay with the original so pixels in focus are not mixed with out of focus pixels.
Diffstat (limited to 'source/blender/compositor/nodes/COM_DefocusNode.cpp')
-rw-r--r-- | source/blender/compositor/nodes/COM_DefocusNode.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/compositor/nodes/COM_DefocusNode.cpp b/source/blender/compositor/nodes/COM_DefocusNode.cpp index 7354c4fcd65..c2bd8997525 100644 --- a/source/blender/compositor/nodes/COM_DefocusNode.cpp +++ b/source/blender/compositor/nodes/COM_DefocusNode.cpp @@ -73,11 +73,14 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext this->getInputSocket(1)->relinkConnections(converter->getInputSocket(0), 1, graph); graph->addOperation(converter); - FastGaussianBlurValueOperation * blur = new FastGaussianBlurValueOperation(); + FastGaussianBlurValueOperation *blur = new FastGaussianBlurValueOperation(); addLink(graph, converter->getOutputSocket(0), blur->getInputSocket(0)); graph->addOperation(blur); radiusOperation = blur; converter->setPostBlur(blur); + + /* maintain close pixels so far Z values don't bleed into the foreground */ + blur->setOverlay(FAST_GAUSS_OVERLAY_MIN); } BokehImageOperation *bokeh = new BokehImageOperation(); |