Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/nodes/COM_ZCombineNode.cc
| Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | void ZCombineNode::convertToOperations(NodeConverter &converter, | ||||
| else { | else { | ||||
| /* XXX custom1 is "use_alpha", what on earth is this supposed to do here?!? */ | /* XXX custom1 is "use_alpha", what on earth is this supposed to do here?!? */ | ||||
| /* not full anti alias, use masking for Z combine. be aware it uses anti aliasing. */ | /* not full anti alias, use masking for Z combine. be aware it uses anti aliasing. */ | ||||
| /* Step 1 create mask. */ | /* Step 1 create mask. */ | ||||
| NodeOperation *maskoperation; | NodeOperation *maskoperation; | ||||
| if (this->getbNode()->custom1) { | if (this->getbNode()->custom1) { | ||||
| maskoperation = new MathGreaterThanOperation(); | maskoperation = new MathGreaterThanOperation(); | ||||
| converter.addOperation(maskoperation); | |||||
| converter.mapInputSocket(getInputSocket(1), maskoperation->getInputSocket(0)); | |||||
| converter.mapInputSocket(getInputSocket(3), maskoperation->getInputSocket(1)); | |||||
| } | } | ||||
| else { | else { | ||||
| maskoperation = new MathLessThanOperation(); | maskoperation = new MathLessThanOperation(); | ||||
| } | |||||
| converter.addOperation(maskoperation); | converter.addOperation(maskoperation); | ||||
| converter.mapInputSocket(getInputSocket(1), maskoperation->getInputSocket(0)); | converter.mapInputSocket(getInputSocket(1), maskoperation->getInputSocket(0)); | ||||
| converter.mapInputSocket(getInputSocket(3), maskoperation->getInputSocket(1)); | converter.mapInputSocket(getInputSocket(3), maskoperation->getInputSocket(1)); | ||||
| } | |||||
| /* Step 2 anti alias mask bit of an expensive operation, but does the trick. */ | /* Step 2 anti alias mask bit of an expensive operation, but does the trick. */ | ||||
| AntiAliasOperation *antialiasoperation = new AntiAliasOperation(); | AntiAliasOperation *antialiasoperation = new AntiAliasOperation(); | ||||
| converter.addOperation(antialiasoperation); | converter.addOperation(antialiasoperation); | ||||
| converter.addLink(maskoperation->getOutputSocket(), antialiasoperation->getInputSocket(0)); | converter.addLink(maskoperation->getOutputSocket(), antialiasoperation->getInputSocket(0)); | ||||
| /* use mask to blend between the input colors. */ | /* use mask to blend between the input colors. */ | ||||
| Show All 20 Lines | |||||