Cleanup: Simplify compositor Z Combine operation conversion

This commit is contained in:
Aaron Carlisle 2021-09-28 18:45:53 -04:00
parent f0f70729b1
commit e81533b25e
1 changed files with 4 additions and 8 deletions

View File

@ -64,18 +64,14 @@ void ZCombineNode::convertToOperations(NodeConverter &converter,
NodeOperation *maskoperation;
if (this->getbNode()->custom1) {
maskoperation = new MathGreaterThanOperation();
converter.addOperation(maskoperation);
converter.mapInputSocket(getInputSocket(1), maskoperation->getInputSocket(0));
converter.mapInputSocket(getInputSocket(3), maskoperation->getInputSocket(1));
}
else {
maskoperation = new MathLessThanOperation();
converter.addOperation(maskoperation);
converter.mapInputSocket(getInputSocket(1), maskoperation->getInputSocket(0));
converter.mapInputSocket(getInputSocket(3), maskoperation->getInputSocket(1));
}
converter.addOperation(maskoperation);
converter.mapInputSocket(getInputSocket(1), maskoperation->getInputSocket(0));
converter.mapInputSocket(getInputSocket(3), maskoperation->getInputSocket(1));
/* Step 2 anti alias mask bit of an expensive operation, but does the trick. */
AntiAliasOperation *antialiasoperation = new AntiAliasOperation();