diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-24 18:19:20 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-05-24 18:19:20 +0400 |
commit | 09344fb1027a03158cf151ec45891ab339c478fc (patch) | |
tree | 694f570aefb456210236c0b74d2a41d21a846c7d /source/blender/compositor/operations | |
parent | 240babf07423d5efcb85edbe8e8d2571e8e163b8 (diff) |
Fix new compositor color to value/bw conversion working different than it did
before. It doesn't make much sense to always multiply with alpha, especially
if it's a premul image that already has it multiplied in.
Patch by Irie Shinsuke.
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp | 2 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp index 4421dec319a..f4be7d2e65b 100644 --- a/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp +++ b/source/blender/compositor/operations/COM_ConvertColorToBWOperation.cpp @@ -38,7 +38,7 @@ void ConvertColorToBWOperation::executePixel(float *outputValue, float x, float { float inputColor[4]; inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers); - outputValue[0] = (inputColor[0]*0.35f + inputColor[1]*0.45f + inputColor[2]*0.2f)*inputColor[3]; + outputValue[0] = inputColor[0]*0.35f + inputColor[1]*0.45f + inputColor[2]*0.2f; } void ConvertColorToBWOperation::deinitExecution() diff --git a/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp b/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp index 84a33f652cd..0d4f2df22d8 100644 --- a/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp +++ b/source/blender/compositor/operations/COM_ConvertColourToValueProg.cpp @@ -38,7 +38,7 @@ void ConvertColourToValueProg::executePixel(float *outputValue, float x, float y { float inputColor[4]; inputOperation->read(&inputColor[0], x, y, sampler, inputBuffers); - outputValue[0] = ((inputColor[0] + inputColor[1] + inputColor[2])/3.0f)*inputColor[3]; + outputValue[0] = (inputColor[0] + inputColor[1] + inputColor[2])/3.0f; } void ConvertColourToValueProg::deinitExecution() |