Hi,
I just begin to learn DirectX11. I am confused about the format of a 2D texture.
For example:
// Create the texture t
CD3D11_TEXTURE2D_DESC textureDesc(
DXGI_FORMAT_B8G8R8A8_UNORM,
m_textureWidth,
m_textureHeight,
1,
1,
D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET
);
m_deviceResources->GetD3DDevice()->CreateTexture2D(&textureDesc, nullptr, &m_texture);
What does DXGI_FORMAT_B8G8R8A8_UNORM mean? I check the MSDN document. It is a four-component, 32-bit unsigned-normalized-integer format that supports 8 bits for each color channel and 8-bit alpha? Does it mean there are four components and each component has 8 bits? But how to use just 8 bits to represent a float type in range [0, 1.0]?
Thanks.
YL