diff options
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r-- | source/blender/compositor/operations/COM_ZCombineOperation.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/compositor/operations/COM_ZCombineOperation.cpp b/source/blender/compositor/operations/COM_ZCombineOperation.cpp index 97a4aefbfac..4368ba4f9a0 100644 --- a/source/blender/compositor/operations/COM_ZCombineOperation.cpp +++ b/source/blender/compositor/operations/COM_ZCombineOperation.cpp @@ -125,10 +125,10 @@ void ZCombineMaskOperation::executePixel(float output[4], float x, float y, Pixe float fac = mask[0]; // multiply mask with alpha, if mask == 0 color1, else color2 make sure - float mfac = 1.0f-fac; - output[0] = color1[0]*mfac + color2[0]*fac; - output[1] = color1[1]*mfac + color2[1]*fac; - output[2] = color1[2]*mfac + color2[2]*fac; + float mfac = 1.0f - fac; + output[0] = color1[0] * mfac + color2[0] * fac; + output[1] = color1[1] * mfac + color2[1] * fac; + output[2] = color1[2] * mfac + color2[2] * fac; output[3] = max(color1[3], color2[3]); } @@ -144,13 +144,13 @@ void ZCombineMaskAlphaOperation::executePixel(float output[4], float x, float y, float fac = mask[0]; // multiply mask with alpha, if mask == 0 color1, else color2 make sure - float mfac = 1.0f-fac; - float alpha = color1[3]*mfac + color2[3]*fac; + float mfac = 1.0f - fac; + float alpha = color1[3] * mfac + color2[3] * fac; float facalpha = fac * alpha; - mfac = 1.0f-facalpha; - output[0] = color1[0]*mfac + color2[0]*facalpha; - output[1] = color1[1]*mfac + color2[1]*facalpha; - output[2] = color1[2]*mfac + color2[2]*facalpha; + mfac = 1.0f - facalpha; + output[0] = color1[0] * mfac + color2[0] * facalpha; + output[1] = color1[1] * mfac + color2[1] * facalpha; + output[2] = color1[2] * mfac + color2[2] * facalpha; output[3] = max(color1[3], color2[3]); } |