Fix T51308: Bright/Contrast Doesn't respect Pre-multiplied Alpha
[blender.git] / source / blender / compositor / nodes / COM_BrightnessNode.cpp
index 053f286c66e9ecb8b8f3d192f2d9147215caca19..6729571fac0fbb0c416a88bd080b69d7af52f12f 100644 (file)
@@ -31,7 +31,9 @@ BrightnessNode::BrightnessNode(bNode *editorNode) : Node(editorNode)
 
 void BrightnessNode::convertToOperations(NodeConverter &converter, const CompositorContext &/*context*/) const
 {
+       bNode *bnode = this->getbNode();
        BrightnessOperation *operation = new BrightnessOperation();
+       operation->setUsePremultiply((bnode->custom1 & 1) != 0);
        converter.addOperation(operation);
        
        converter.mapInputSocket(getInputSocket(0), operation->getInputSocket(0));