From 10456a09acea4f024b52e24786f4055578a8e4d2 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 16 Mar 2014 21:12:23 -0700 Subject: [PATCH] Oops, forgot to multiply in float ToRGBA(). Not actually used... --- GPU/Math3D.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/Math3D.cpp b/GPU/Math3D.cpp index 4065eda0b5..0aa8134bff 100644 --- a/GPU/Math3D.cpp +++ b/GPU/Math3D.cpp @@ -98,7 +98,7 @@ template<> unsigned int Vec3::ToRGB() const { #if defined(_M_SSE) - __m128i c = _mm_cvtps_epi32(vec); + __m128i c = _mm_cvtps_epi32(_mm_mul_ps(vec, _mm_set_ps1(255.0f))); __m128i c16 = _mm_packs_epi32(c, c); return _mm_cvtsi128_si32(_mm_packus_epi16(c16, c16)) & 0x00FFFFFF; #else @@ -200,7 +200,7 @@ template<> unsigned int Vec4::ToRGBA() const { #if defined(_M_SSE) - __m128i c = _mm_cvtps_epi32(vec); + __m128i c = _mm_cvtps_epi32(_mm_mul_ps(vec, _mm_set_ps1(255.0f))); __m128i c16 = _mm_packs_epi32(c, c); return _mm_cvtsi128_si32(_mm_packus_epi16(c16, c16)); #else