In the ldexp(,) call removed the /256.0f by replacing it with a -8 on the exponent.

This commit is contained in:
Robert Osfield
2005-04-15 09:56:28 +00:00
parent 0503712fe4
commit 78577e1aa6

View File

@@ -138,7 +138,7 @@ bool HDRLoader::load(const char *_fileName, HDRLoaderResult &_res)
inline float convertComponent(int _expo, int _val)
{
return ldexp( (float)_val / 256.0f, _expo);
return ldexp( _val, _expo-8);
}
void workOnRGBE(RGBE *_scan, int _len, float *_cols)