[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47836] trunk/blender/source/blender/ compositor/operations/COM_GlareThresholdOperation.cpp: correction for previous commit.
Campbell Barton
ideasman42 at gmail.com
Wed Jun 13 16:51:14 CEST 2012
Revision: 47836
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47836
Author: campbellbarton
Date: 2012-06-13 14:51:07 +0000 (Wed, 13 Jun 2012)
Log Message:
-----------
correction for previous commit.
Modified Paths:
--------------
trunk/blender/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
Modified: trunk/blender/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp
===================================================================
--- trunk/blender/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp 2012-06-13 14:33:50 UTC (rev 47835)
+++ trunk/blender/source/blender/compositor/operations/COM_GlareThresholdOperation.cpp 2012-06-13 14:51:07 UTC (rev 47836)
@@ -37,13 +37,15 @@
void GlareThresholdOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
{
this->inputProgram->read(color, x, y, sampler, inputBuffers);
- if (rgb_to_y_cie(color) >= threshold) {
+ if ((0.212671f * color[0] + 0.71516f * color[1] + 0.072169f * color[2]) >= threshold) {
color[0] -= threshold, color[1] -= threshold, color[2] -= threshold;
color[0] = MAX2(color[0], 0.0f);
color[1] = MAX2(color[1], 0.0f);
color[2] = MAX2(color[2], 0.0f);
}
- else color[0] = color[1] = color[2] = 0.f;
+ else {
+ zero_v3(color);
+ }
}
void GlareThresholdOperation::deinitExecution()
More information about the Bf-blender-cvs
mailing list