Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2012-07-09 19:21:43 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-07-09 19:21:43 +0400
commitbfe776cd1d1e9036bd389469d74984d6f5ce81fb (patch)
tree1f8b1b2975fb78b01d09672df8b258629faafe8a /source/blender/compositor/nodes/COM_DefocusNode.cpp
parent0dafa97ea3f6d9662299579e5be1875cd28baaae (diff)
removed depth aware defocus
add blur to radius buffer
Diffstat (limited to 'source/blender/compositor/nodes/COM_DefocusNode.cpp')
-rw-r--r--source/blender/compositor/nodes/COM_DefocusNode.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/compositor/nodes/COM_DefocusNode.cpp b/source/blender/compositor/nodes/COM_DefocusNode.cpp
index 4c6b3ad137b..05bf907af5a 100644
--- a/source/blender/compositor/nodes/COM_DefocusNode.cpp
+++ b/source/blender/compositor/nodes/COM_DefocusNode.cpp
@@ -32,6 +32,7 @@
#include "COM_MathBaseOperation.h"
#include "COM_SetValueOperation.h"
#include "COM_GammaCorrectOperation.h"
+#include "COM_FastGaussianBlurOperation.h"
DefocusNode::DefocusNode(bNode *editorNode) : Node(editorNode)
{
@@ -46,7 +47,6 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
NodeDefocus *data = (NodeDefocus *)node->storage;
NodeOperation *radiusOperation;
- OutputSocket * depthOperation;
if (data->no_zbuf) {
MathMultiplyOperation *multiply = new MathMultiplyOperation();
SetValueOperation *multiplier = new SetValueOperation();
@@ -64,7 +64,6 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
graph->addOperation(maxRadius);
graph->addOperation(minimize);
radiusOperation = minimize;
- depthOperation = minimize->getOutputSocket(0);
}
else {
ConvertDepthToRadiusOperation *converter = new ConvertDepthToRadiusOperation();
@@ -73,8 +72,12 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
converter->setMaxRadius(data->maxblur);
this->getInputSocket(1)->relinkConnections(converter->getInputSocket(0), 1, graph);
graph->addOperation(converter);
- radiusOperation = converter;
- depthOperation = converter->getInputSocket(0)->getConnection()->getFromSocket();
+
+ FastGaussianBlurValueOperation * blur = new FastGaussianBlurValueOperation();
+ addLink(graph, converter->getOutputSocket(0), blur->getInputSocket(0));
+ graph->addOperation(blur);
+ radiusOperation = blur;
+ converter->setPostBlur(blur);
}
BokehImageOperation *bokeh = new BokehImageOperation();
@@ -112,7 +115,6 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
operation->setThreshold(data->bthresh);
addLink(graph, bokeh->getOutputSocket(), operation->getInputSocket(1));
addLink(graph, radiusOperation->getOutputSocket(), operation->getInputSocket(2));
- addLink(graph, depthOperation, operation->getInputSocket(3));
#ifdef COM_DEFOCUS_SEARCH
addLink(graph, search->getOutputSocket(), operation->getInputSocket(4));
#endif