diff --git a/include/vsg/maths/color.h b/include/vsg/maths/color.h index 14c56f136..41f60e0f0 100644 --- a/include/vsg/maths/color.h +++ b/include/vsg/maths/color.h @@ -100,28 +100,28 @@ namespace vsg constexpr t_vec4 linear_to_sRGB(const t_vec4& src) { const T exponent = 2.2; - return t_vec4(std::pow(src.r, exponent), std::pow(src.g, exponent), std::pow(src.b, exponent), std::pow(src.a, exponent)); + return t_vec4(std::pow(src.r, exponent), std::pow(src.g, exponent), std::pow(src.b, exponent), src.a); } template constexpr t_vec4 linear_to_sRGB(T r, T g, T b, T a) { const T exponent = 2.2; - return t_vec4(std::pow(r, exponent), std::pow(g, exponent), std::pow(b, exponent), std::pow(a, exponent)); + return t_vec4(std::pow(r, exponent), std::pow(g, exponent), std::pow(b, exponent), a); } template constexpr t_vec4 sRGB_to_linear(const t_vec4& src) { const T exponent = 1.0/2.2; - return t_vec4(std::pow(src.r, exponent), std::pow(src.g, exponent), std::pow(src.b, exponent), std::pow(src.a, exponent)); + return t_vec4(std::pow(src.r, exponent), std::pow(src.g, exponent), std::pow(src.b, exponent), src.a); } template constexpr t_vec4 sRGB_to_linear(T r, T g, T b, T a) { const T exponent = 1.0/2.2; - return t_vec4(std::pow(r, exponent), std::pow(g, exponent), std::pow(b, exponent), std::pow(a, exponent)); + return t_vec4(std::pow(r, exponent), std::pow(g, exponent), std::pow(b, exponent), a); } } // namespace vsg