Page MenuHome

compo.patch

compo.patch

Index: source/blender/compositor/operations/COM_MixGlareOperation.cpp
===================================================================
--- source/blender/compositor/operations/COM_MixGlareOperation.cpp (revision 51010)
+++ source/blender/compositor/operations/COM_MixGlareOperation.cpp (working copy)
@@ -40,9 +40,13 @@
value = inputValue[0];
float mf = 2.f - 2.f * fabsf(value - 0.5f);
- output[0] = mf * ((inputColor1[0]) + value * (inputColor2[0] - inputColor1[0]));
- output[1] = mf * ((inputColor1[1]) + value * (inputColor2[1] - inputColor1[1]));
- output[2] = mf * ((inputColor1[2]) + value * (inputColor2[2] - inputColor1[2]));
+ if (inputColor1[0] < 0.0f) inputColor1[0] = 0.0f;
+ if (inputColor1[1] < 0.0f) inputColor1[1] = 0.0f;
+ if (inputColor1[2] < 0.0f) inputColor1[2] = 0.0f;
+
+ output[0] = mf * max(inputColor1[0] + value * (inputColor2[0] - inputColor1[0]), 0.0f);
+ output[1] = mf * max(inputColor1[1] + value * (inputColor2[1] - inputColor1[1]), 0.0f);
+ output[2] = mf * max(inputColor1[2] + value * (inputColor2[2] - inputColor1[2]), 0.0f);
output[3] = inputColor1[3];
clampIfNeeded(output);

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
02/d0/2231c61351c08879a2c4a361af8d

Event Timeline