DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
1.52k
stars
234
forks
source link
DirectXTex converts floating point numbers to integers by different way between BC4 and BC5. #105
Closed
yosshin4004 closed 4 years ago
DirectXTex converts floating point numbers to integers by different way between BC4 and BC5. Is this correct behaviour?
In case of BC4: fractions will be cut off.
DecompressBC decodes BC4 pixel block as float precision. _StoreScanline converts it as DXGI_FORMAT_R8_SNORM by following code.
In case of BC5: fractions will be round up.
DecompressBC decodes BC5 pixel block as float precision. _StoreScanline converts it as DXGI_FORMAT_R8G8_SNORM by XMStoreByteN2 as follows.