45 std::abs(a_rhs.
green),
46 std::abs(a_rhs.
blue));
51 return NiColor(std::clamp(a_rhs.
red, a_min, a_max),
52 std::clamp(a_rhs.
green, a_min, a_max),
53 std::clamp(a_rhs.
blue, a_min, a_max));
59 std::floor(a_rhs.
green),
60 std::floor(a_rhs.
blue));
66 (std::min)(a_lhs.
red, a_rhs.red),
67 (std::min)(a_lhs.
green, a_rhs.green),
68 (std::min)(a_lhs.
blue, a_rhs.blue));
74 (std::max)(a_lhs.
red, a_rhs.red),
75 (std::max)(a_lhs.
green, a_rhs.green),
76 (std::max)(a_lhs.
blue, a_rhs.blue));
83 return (
min)(a_src, a_dest);
88 return a_src * a_dest;
93 return 1.0 - (1.0 - a_dest) / a_src;
98 return a_src + a_dest - 1.0;
108 return (
max)(a_src, a_dest);
113 return a_src + a_dest - a_src * a_dest;
118 return a_dest / (1.0 - a_src);
123 return a_src + a_dest;
131 inline float overlay(
float a_src,
float a_dest)
133 return (a_dest < 0.5f) ? 2.0f * a_src * a_dest : 1.0f - 2.0f * (1.0f - a_src) * (1.0f - a_dest);
143 return (a_src < 0.5f) ? a_dest - (1.0f - 2.0f * a_src) * a_dest * (1.0f - a_dest) : (a_dest < 0.25f) ? a_dest + (2.0f * a_src - 1.0f) * a_dest * ((16.0f * a_dest - 12.0f) * a_dest + 3.0f) :
144 a_dest + (2.0f * a_src - 1.0f) * (sqrt(a_dest) - a_dest);
154 return (a_src < 0.5f) ? 2.0f * a_src * a_dest : 1.0f - 2.0f * (1.0f - a_src) * (1.0f - a_dest);
164 return (a_src < 0.5f) ? 1.0f - (1.0f - a_dest) / (2.0f * a_src) : a_dest / (2.0f * (1.0f - a_src));
174 return 2.0 * a_src + a_dest - 1.0;
179 return (2.0f * a_src - 1.0f > a_dest) ? 2.0f * a_src - 1.0f : (a_src < 0.5f * a_dest) ? 2.0f * a_src :
190 return floor(a_src + a_dest);
195 return abs(a_dest - a_src);
200 return a_src + a_dest - 2.0 * a_src * a_dest;
205 return a_src - a_dest;
210 return a_src / a_dest;
215 return a_src * (1 - a_alpha) + a_dest * a_alpha;
float red
Definition NiColor.h:269
float green
Definition NiColor.h:270
float blue
Definition NiColor.h:271
NiColor floor(const NiColor &a_rhs)
Definition ColorUtil.h:56
NiColor abs(const NiColor &a_rhs)
Definition ColorUtil.h:42
NiColor multiply(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:86
NiColor() max(const NiColor &a_lhs, const NiColor &a_rhs)
Definition ColorUtil.h:71
NiColor linearBurn(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:96
NiColor hardMix(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:188
NiColor colorBurn(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:91
NiColor screen(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:111
NiColor lighterColor(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:126
NiColor() min(const NiColor &a_lhs, const NiColor &a_rhs)
Definition ColorUtil.h:63
float vividLight(float a_src, float a_dest)
Definition ColorUtil.h:162
NiColor clamp(const NiColor &a_rhs, float a_min, float a_max)
Definition ColorUtil.h:49
float softLight(float a_src, float a_dest)
Definition ColorUtil.h:141
NiColor divide(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:208
NiColor mix(const NiColor &a_src, const NiColor &a_dest, float a_alpha)
Definition ColorUtil.h:213
NiColor subtract(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:203
NiColor linearDodge(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:121
NiColor darkerColor(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:101
NiColor colorDodge(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:116
NiColor linearLight(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:172
float pinLight(float a_src, float a_dest)
Definition ColorUtil.h:177
NiColor exclusion(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:198
NiColor difference(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:193
float hardLight(float a_src, float a_dest)
Definition ColorUtil.h:152
NiColor lighten(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:106
NiColor darken(const NiColor &a_src, const NiColor &a_dest)
Definition ColorUtil.h:81
float overlay(float a_src, float a_dest)
Definition ColorUtil.h:131
float CalcLuminance(const NiColor &a_src)
BLEND_MODE
Definition ColorUtil.h:10
NiColor Mix(const NiColor &a_src, const NiColor &a_dest, float a_percentage)
NiColor Blend(const NiColor &a_src, const NiColor &a_dest, BLEND_MODE a_mode, float a_alpha)
Definition AbsorbEffect.h:6