共用方式為


(HLSL 參考) 格式轉換函式

區段包含計算和圖元著色器中使用的格式轉換函式。

D3DX_DXGIFormatConvert.inl 標頭隨附于舊版 DirectX SDK 中,並依賴 XNAMath for C++ 支援。 它也包含在 Microsoft.DXSDK.D3DX NuGet 套件中。 最新版本使用 DirectXMath 來支援 C++,而且所有函式都定義在 DirectX C++ 命名空間中。

轉換器函式

DXGI_FORMAT_R10G10B10A2_UNORM

D3DX_R10G10B10A2_UNORM_to_FLOAT4
D3DX_FLOAT4_to_R10G10B10A2_UNORM

DXGI_FORMAT_R10G10B10A2_UINT

D3DX_R10G10B10A2_UINT_to_UINT4
D3DX_UINT4_to_R10G10B10A2_UINT

DXGI_FORMAT_R8G8B8A8_UNORM:

D3DX_R8G8B8A8_UNORM_to_FLOAT4
D3DX_FLOAT4_to_R8G8B8A8_UNORM

DXGI_FORMAT_R8G8B8A8_UNORM_SRGB

D3DX_R8G8B8A8_UNORM_SRGB_to_FLOAT4_inexact
D3DX_R8G8B8A8_UNORM_SRGB_to_FLOAT4
D3DX_FLOAT4_to_R8G8B8A8_UNORM_SRGB

DXGI_FORMAT_R8G8B8A8_UINT

D3DX_R8G8B8A8_UINT_to_UINT4
D3DX_UINT4_to_R8G8B8A8_UINT

DXGI_FORMAT_R8G8B8A8_SNORM

D3DX_R8G8B8A8_SNORM_to_FLOAT4
D3DX_FLOAT4_to_R8G8B8A8_SNORM

DXGI_FORMAT_R8G8B8A8_SINT

D3DX_R8G8B8A8_SINT_to_INT4
D3DX_INT4_to_R8G8B8A8_SINT

DXGI_FORMAT_B8G8R8A8_UNORM

D3DX_B8G8R8A8_UNORM_to_FLOAT4
D3DX_FLOAT4_to_B8G8R8A8_UNORM

DXGI_FORMAT_B8G8R8A8_UNORM_SRGB

D3DX_B8G8R8A8_UNORM_SRGB_to_FLOAT4_inexact
D3DX_B8G8R8A8_UNORM_SRGB_to_FLOAT4
D3DX_FLOAT4_to_R8G8B8A8_UNORM_SRGB

DXGI_FORMAT_B8G8R8X8_UNORM

D3DX_B8G8R8X8_UNORM_to_FLOAT3
D3DX_FLOAT3_to_B8G8R8X8_UNORM

DXGI_FORMAT_B8G8R8X8_UNORM_SRGB

D3DX_B8G8R8X8_UNORM_SRGB_to_FLOAT3_inexact
D3DX_B8G8R8X8_UNORM_SRGB_to_FLOAT3
D3DX_FLOAT3_to_B8G8R8X8_UNORM_SRGB

DXGI_FORMAT_R16G16_FLOAT

D3DX_R16G16_FLOAT_to_FLOAT2
D3DX_FLOAT2_to_R16G16_FLOAT

DXGI_FORMAT_R16G16_UNORM

D3DX_R16G16_UNORM_to_FLOAT2
D3DX_FLOAT2_to_R16G16_UNORM

DXGI_FORMAT_R16G16_UINT

D3DX_R16G16_UINT_to_UINT2
D3DX_UINT2_to_R16G16_UINT

DXGI_FORMAT_R16G16_SNORM

D3DX_R16G16_SNORM_to_FLOAT2
D3DX_FLOAT2_to_R16G16_SNORM

DXGI_FORMAT_R16G16_SINT

D3DX_R16G16_SINT_to_INT2
D3DX_INT2_to_R16G16_SINT

內嵌格式轉換參考

In-Place影像編輯的解壓縮和封裝DXGI_FORMAT