Skip to content

Commit e2a7569

Browse files
committed
TColor descriptor-construction fix
1 parent 89582e4 commit e2a7569

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: source/Colors/TColor.inl

+4-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,10 @@ namespace Langulus::Math
124124
else if constexpr (not IsReal and CT::Real<AS>) {
125125
// If we're initializing integer color using reals,
126126
// we have to multiply by 255 and saturate
127-
SIMD::Multiply<true>(all_as, AS {255}, all);
127+
SIMD::Multiply(all_as, AS {255}, all_as);
128+
SIMD::Min(all_as, InnerT {255}, all_as);
129+
SIMD::Max(all_as, InnerT {0}, all_as);
130+
SIMD::Convert<Default>(all_as, all);
128131
}
129132
else SIMD::Convert<Default>(all_as, all);
130133
}

0 commit comments

Comments
 (0)