diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-15 22:42:03 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-15 22:42:03 +0400 |
commit | 570cc70772d78703053956ce57b20c6c4ed74c95 (patch) | |
tree | b4c5db0392384251f1b1ccefc17c959d3e742977 /source/blender/compositor/operations/COM_ZCombineOperation.cpp | |
parent | 8fd2267e56d3d0b6bb860800eb8059bcbfa0b501 (diff) |
style cleanup: compositor operations
Diffstat (limited to 'source/blender/compositor/operations/COM_ZCombineOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ZCombineOperation.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.cpp b/source/blender/compositor/operations/COM_ZCombineOperation.cpp index 7f32bac2e64..eb02b150fa4 100644 --- a/source/blender/compositor/operations/COM_ZCombineOperation.cpp +++ b/source/blender/compositor/operations/COM_ZCombineOperation.cpp @@ -23,7 +23,7 @@ #include "COM_ZCombineOperation.h" #include "BLI_utildefines.h" -ZCombineOperation::ZCombineOperation(): NodeOperation() +ZCombineOperation::ZCombineOperation() : NodeOperation() { this->addInputSocket(COM_DT_COLOR); this->addInputSocket(COM_DT_VALUE); @@ -53,7 +53,7 @@ void ZCombineOperation::executePixel(float *color, float x, float y, PixelSample this->depth1Reader->read(depth1, x, y, sampler, inputBuffers); this->depth2Reader->read(depth2, x, y, sampler, inputBuffers); - if (depth1[0]<depth2[0]) { + if (depth1[0] < depth2[0]) { this->image1Reader->read(color, x, y, sampler, inputBuffers); } else { @@ -69,7 +69,7 @@ void ZCombineAlphaOperation::executePixel(float *color, float x, float y, PixelS this->depth1Reader->read(depth1, x, y, sampler, inputBuffers); this->depth2Reader->read(depth2, x, y, sampler, inputBuffers); - if (depth1[0]<depth2[0]) { + if (depth1[0] < depth2[0]) { this->image1Reader->read(color1, x, y, sampler, inputBuffers); this->image2Reader->read(color2, x, y, sampler, inputBuffers); } @@ -78,10 +78,10 @@ void ZCombineAlphaOperation::executePixel(float *color, float x, float y, PixelS this->image2Reader->read(color1, x, y, sampler, inputBuffers); } float fac = color1[3]; - float ifac = 1.0f-fac; - color[0] = color1[0]+ifac*color2[0]; - color[1] = color1[1]+ifac*color2[1]; - color[2] = color1[2]+ifac*color2[2]; + float ifac = 1.0f - fac; + color[0] = color1[0] + ifac * color2[0]; + color[1] = color1[1] + ifac * color2[1]; + color[2] = color1[2] + ifac * color2[2]; color[3] = MAX2(color1[3], color2[3]); } |