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:
Diffstat (limited to 'source/blender/compositor/nodes/COM_GlareNode.cpp')
-rw-r--r--source/blender/compositor/nodes/COM_GlareNode.cpp16
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);