diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-05-21 14:20:30 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-05-21 14:20:30 +0400 |
commit | 998a850f9f2747065ffe379097907232a85cd2d5 (patch) | |
tree | a4b86c8a1f10e1c39e7557edad82d2a55574ea62 /source/blender/compositor/nodes/COM_GlareNode.cpp | |
parent | 14e4ad930209a3b861b5b514fbd23b39a7d16e94 (diff) |
Added switch in dilate/erode between old (Step) and new (Distance)
algorithm
Connected the Glare Fog Flow to use Fast Gaussian in stead of Bokeh blur
Diffstat (limited to 'source/blender/compositor/nodes/COM_GlareNode.cpp')
-rw-r--r-- | source/blender/compositor/nodes/COM_GlareNode.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/compositor/nodes/COM_GlareNode.cpp b/source/blender/compositor/nodes/COM_GlareNode.cpp index c65adc862b1..e882c16814a 100644 --- a/source/blender/compositor/nodes/COM_GlareNode.cpp +++ b/source/blender/compositor/nodes/COM_GlareNode.cpp @@ -23,12 +23,12 @@ #include "COM_GlareNode.h" #include "DNA_node_types.h" #include "COM_FogGlowImageOperation.h" -#include "COM_BokehBlurOperation.h" #include "COM_GlareThresholdOperation.h" #include "COM_GlareSimpleStarOperation.h" #include "COM_GlareStreaksOperation.h" #include "COM_SetValueOperation.h" #include "COM_MixBlendOperation.h" +#include "COM_FastGaussianBlurOperation.h" GlareNode::GlareNode(bNode *editorNode): Node(editorNode) { @@ -70,29 +70,31 @@ void GlareNode::convertToOperations(ExecutionSystem *system, CompositorContext * case 1: // fog glow { GlareThresholdOperation *thresholdOperation = new GlareThresholdOperation(); - FogGlowImageOperation * kerneloperation = new FogGlowImageOperation(); - BokehBlurOperation * bluroperation = new BokehBlurOperation(); + FastGaussianBlurOperation* bluroperation = new FastGaussianBlurOperation(); SetValueOperation * valueoperation = new SetValueOperation(); SetValueOperation * mixvalueoperation = new SetValueOperation(); MixBlendOperation * mixoperation = new MixBlendOperation(); mixoperation->setResolutionInputSocketIndex(1); this->getInputSocket(0)->relinkConnections(thresholdOperation->getInputSocket(0), true, 0, system); addLink(system, thresholdOperation->getOutputSocket(), bluroperation->getInputSocket(0)); - addLink(system, kerneloperation->getOutputSocket(), bluroperation->getInputSocket(1)); - addLink(system, valueoperation->getOutputSocket(), bluroperation->getInputSocket(2)); + addLink(system, valueoperation->getOutputSocket(), bluroperation->getInputSocket(1)); addLink(system, mixvalueoperation->getOutputSocket(), mixoperation->getInputSocket(0)); addLink(system, bluroperation->getOutputSocket(), mixoperation->getInputSocket(2)); addLink(system, thresholdOperation->getInputSocket(0)->getConnection()->getFromSocket(), mixoperation->getInputSocket(1)); thresholdOperation->setThreshold(glare->threshold); - bluroperation->setSize(0.003f*glare->size); + NodeBlurData * data = new NodeBlurData(); + data->relative = 0; + data->sizex = glare->size; + data->sizey = glare->size; + bluroperation->setData(data); + bluroperation->deleteDataWhenFinished(); bluroperation->setQuality(context->getQuality()); valueoperation->setValue(1.0f); mixvalueoperation->setValue(0.5f+glare->mix*0.5f); this->getOutputSocket()->relinkConnections(mixoperation->getOutputSocket()); system->addOperation(bluroperation); - system->addOperation(kerneloperation); system->addOperation(thresholdOperation); system->addOperation(mixvalueoperation); system->addOperation(valueoperation); |