microsoft / DirectXMath

DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
https://walbourn.github.io/introducing-directxmath/
MIT License
1.53k stars 236 forks source link

XMStoreFloat3SE fails if max channel isn't a perfect power of 2 #33

Closed walbourn closed 8 years ago

walbourn commented 8 years ago

Need to change:

fi.i = 0x83000000 - (fi.i);
float ScaleR = fi.f;

to

fi.i = 0x83000000 - (fi.i & 0x7F800000);
float ScaleR = fi.f;

The fix made in DirectXMath 3.07 was only a partial fix.

walbourn commented 8 years ago

Need to add a workaround to DirectXTex so it will work correctly with DXGI_FORMAT_R9G9B9E5_SHAREDEXP conversions when using older versions of DirectXMath without this fix.

walbourn commented 8 years ago

Fixed for DirectXMath 3.10