doing the correct conversion for byte to normalize float...

This commit is contained in:
samcake 2015-10-26 12:24:20 -07:00
parent ff57b73bd6
commit 8e2c269cc0

View file

@ -23,8 +23,8 @@ public:
};
inline glm::vec3 ColorUtils::toVec3(const xColor& color) {
const float ONE_OVER_256 = 1.0f / 256.0f;
return glm::vec3(color.red * ONE_OVER_256, color.green * ONE_OVER_256, color.blue * ONE_OVER_256);
const float ONE_OVER_255 = 1.0f / 255.0f;
return glm::vec3(color.red * ONE_OVER_255, color.green * ONE_OVER_255, color.blue * ONE_OVER_255);
}
#endif // hifi_ColorUtils_h