一直不后缀unorm和snorm什么意思,今天看introduction dx11 忽然明白,就是类型+是否归一化,(还有个typeless)
DXGI_FORMAT_R32G32B32_FLOAT: Each element has three 32-bit floating-point components.
DXGI_FORMAT_R16G16B16A16_UNORM: Each element has four 16-bit components mapped to the [0, 1] range.
DXGI_FORMAT_R32G32_UINT: Each element has two 32-bit unsigned integer components.
DXGI_FORMAT_R8G8B8A8_UNORM: Each element has four 8-bit unsigned components mapped to the [0, 1] range.
DXGI_FORMAT_R8G8B8A8_SNORM: Each element has four 8-bit signed components mapped to the [−1, 1] range.
DXGI_FORMAT_R8G8B8A8_SINT: Each element has four 8-bit signed integer components mapped to the [−128, 127] range.
DXGI_FORMAT_R8G8B8A8_UINT: Each element has four 8-bit unsigned integer components mapped to the [0, 255] range.
S:signed
U:unsigned
NORM:[-1,1] or [0,1]
The depth buffer is a texture, so it must be created with certain data formats. The formats used for depth buffering are as follows:
1. DXGI_FORMAT_D32_FLOAT_S8X24_UINT: Specifies a 32-bit floating-point depth buffer, with 8-bits (unsigned integer) reserved for the stencil buffer mapped to the [0, 255] range and 24-bits not used for padding.
2. DXGI_FORMAT_D32_FLOAT: Specifies a 32-bit floating-point depth buffer.
3. DXGI_FORMAT_D24_UNORM_S8_UINT: Specifies an unsigned 24-bit depth buffer mapped to the [0, 1] range with 8-bits (unsigned integer) reserved for the stencil buffer mapped to the [0, 255] range.
4. DXGI_FORMAT_D16_UNORM: Specifies an unsigned 16-bit depth buffer mapped to the [0, 1] range.