diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-13 19:05:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-13 19:05:42 +0400 |
commit | 1dec23d33a86c0412852ef510fc5b5b619284697 (patch) | |
tree | 22250958b09cf33ac1e6ea764709194da4307b13 /source/blender/compositor/operations/COM_GlareThresholdOperation.cpp | |
parent | e22aa7bc38c5d38a0714bed8a2a1869383cd5e5a (diff) |
add rgb_to_luma_y(), was being done inline in many places.
Diffstat (limited to 'source/blender/compositor/operations/COM_GlareThresholdOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GlareThresholdOperation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp index 4ca5f575cfe..ea76e7551ad 100644 --- a/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp +++ b/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp @@ -37,7 +37,7 @@ void GlareThresholdOperation::initExecution() void GlareThresholdOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { this->inputProgram->read(color, x, y, sampler, inputBuffers); - if ((0.212671f * color[0] + 0.71516f * color[1] + 0.072169f * color[2]) >= threshold) { + if (rgb_to_luma_y(color) >= threshold) { color[0] -= threshold, color[1] -= threshold, color[2] -= threshold; color[0] = MAX2(color[0], 0.0f); color[1] = MAX2(color[1], 0.0f); |