diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-05-31 17:05:00 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-05-31 17:05:00 +0400 |
commit | b04cd3a76561f17ef0951837ae0ea169e563a571 (patch) | |
tree | 35070f4b51bb4255f8c3d608646424bb8ba3c7e1 /source/blender/compositor/nodes/COM_GlareNode.cpp | |
parent | ceea98be2f54ed72691a130ea8eed613726e4521 (diff) |
Fix for [#31602] Node Glare: Ghosts effect
Diffstat (limited to 'source/blender/compositor/nodes/COM_GlareNode.cpp')
-rw-r--r-- | source/blender/compositor/nodes/COM_GlareNode.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/blender/compositor/nodes/COM_GlareNode.cpp b/source/blender/compositor/nodes/COM_GlareNode.cpp index 9382e726d76..dc367040c9a 100644 --- a/source/blender/compositor/nodes/COM_GlareNode.cpp +++ b/source/blender/compositor/nodes/COM_GlareNode.cpp @@ -29,6 +29,7 @@ #include "COM_SetValueOperation.h" #include "COM_MixBlendOperation.h" #include "COM_FastGaussianBlurOperation.h" +#include "COM_GlareGhostOperation.h" GlareNode::GlareNode(bNode *editorNode): Node(editorNode) { @@ -42,6 +43,30 @@ void GlareNode::convertToOperations(ExecutionSystem *system, CompositorContext * switch (glare->type) { default: + case 3: + { + GlareThresholdOperation *thresholdOperation = new GlareThresholdOperation(); + GlareGhostOperation * glareoperation = new GlareGhostOperation(); + SetValueOperation * mixvalueoperation = new SetValueOperation(); + MixBlendOperation * mixoperation = new MixBlendOperation(); + + this->getInputSocket(0)->relinkConnections(thresholdOperation->getInputSocket(0), 0, system); + addLink(system, thresholdOperation->getOutputSocket(), glareoperation->getInputSocket(0)); + addLink(system, mixvalueoperation->getOutputSocket(), mixoperation->getInputSocket(0)); + addLink(system, glareoperation->getOutputSocket(), mixoperation->getInputSocket(2)); + addLink(system, thresholdOperation->getInputSocket(0)->getConnection()->getFromSocket(), mixoperation->getInputSocket(1)); + this->getOutputSocket()->relinkConnections(mixoperation->getOutputSocket()); + + thresholdOperation->setThreshold(glare->threshold); + glareoperation->setGlareSettings(glare); + mixvalueoperation->setValue(0.5f+glare->mix*0.5f); + mixoperation->setResolutionInputSocketIndex(1); + + system->addOperation(glareoperation); + system->addOperation(thresholdOperation); + system->addOperation(mixvalueoperation); + system->addOperation(mixoperation); + } case 2: // streaks { GlareThresholdOperation *thresholdOperation = new GlareThresholdOperation(); |