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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-13 14:40:42 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-13 14:40:42 +0400
commitfa4ef0828e0211fdfdd06b125ed244cba06c1293 (patch)
tree36b2acbb1c0cf45e97dc3756105b7bec68f7d17e /source/blender/compositor/nodes
parent4e5541a9a64008526adbbcd676d01cee9751e284 (diff)
Fix #35327: compositing Z combine node was not giving the same result as previous
versions when the Z values were the same, Also was inconsistent between full sample on/off.
Diffstat (limited to 'source/blender/compositor/nodes')
-rw-r--r--source/blender/compositor/nodes/COM_ZCombineNode.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/compositor/nodes/COM_ZCombineNode.cpp b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
index 82effaf0eda..95f06e350b1 100644
--- a/source/blender/compositor/nodes/COM_ZCombineNode.cpp
+++ b/source/blender/compositor/nodes/COM_ZCombineNode.cpp
@@ -71,9 +71,18 @@ void ZCombineNode::convertToOperations(ExecutionSystem *system, CompositorContex
else {
// not full anti alias, use masking for Z combine. be aware it uses anti aliasing.
// step 1 create mask
- MathGreaterThanOperation *maskoperation = new MathGreaterThanOperation();
- this->getInputSocket(1)->relinkConnections(maskoperation->getInputSocket(0), 1, system);
- this->getInputSocket(3)->relinkConnections(maskoperation->getInputSocket(1), 3, system);
+ NodeOperation *maskoperation;
+
+ if (this->getbNode()->custom1) {
+ maskoperation = new MathGreaterThanOperation();
+ this->getInputSocket(1)->relinkConnections(maskoperation->getInputSocket(0), 3, system);
+ this->getInputSocket(3)->relinkConnections(maskoperation->getInputSocket(1), 1, system);
+ }
+ else {
+ maskoperation = new MathLessThanOperation();
+ this->getInputSocket(1)->relinkConnections(maskoperation->getInputSocket(0), 1, system);
+ this->getInputSocket(3)->relinkConnections(maskoperation->getInputSocket(1), 3, system);
+ }
// step 2 anti alias mask bit of an expensive operation, but does the trick
AntiAliasOperation *antialiasoperation = new AntiAliasOperation();