This commit is contained in:
Branimir Karadžić
2018-12-10 20:43:01 -08:00
parent 7224cff4dc
commit 756a62fc02

View File

@@ -90,12 +90,8 @@ void imageRgba32fNormalize(void* _dst, uint32_t _width, uint32_t _height, uint32
const float* rgba = (const float*)&src[0]; const float* rgba = (const float*)&src[0];
for (uint32_t xx = 0; xx < _width; ++xx, rgba += 4, dst += 16) for (uint32_t xx = 0; xx < _width; ++xx, rgba += 4, dst += 16)
{ {
float xyz[3]; const bx::Vec3 xyz = bx::load(rgba);
bx::store(dst, bx::normalize(xyz) );
xyz[0] = rgba[0];
xyz[1] = rgba[1];
xyz[2] = rgba[2];
bx::vec3Norm( (float*)dst, xyz);
} }
} }
} }