CD3DX12_STATIC_SAMPLER_DESC 结构

一个帮助程序结构,用于轻松初始化 D3D12_STATIC_SAMPLER_DESC 结构。

语法

struct CD3DX12_STATIC_SAMPLER_DESC  : public D3D12_STATIC_SAMPLER_DESC{
       CD3DX12_STATIC_SAMPLER_DESC();
       explicit CD3DX12_STATIC_SAMPLER_DESC(const D3D12_STATIC_SAMPLER_DESC &o);
       CD3DX12_STATIC_SAMPLER_DESC(UINT shaderRegister, D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC, D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP, D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP, D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP, FLOAT mipLODBias = 0, UINT maxAnisotropy = 16, D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL, D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE, FLOAT minLOD = 0.f, FLOAT maxLOD = D3D12_FLOAT32_MAX, D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL, UINT registerSpace = 0);
  void static inline Init(D3D12_STATIC_SAMPLER_DESC &samplerDesc, UINT shaderRegister, D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC, D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP, D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP, D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP, FLOAT mipLODBias = 0, UINT maxAnisotropy = 16, D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL, D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE, FLOAT minLOD = 0.f, FLOAT maxLOD = D3D12_FLOAT32_MAX, D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL, UINT registerSpace = 0);
  void inline Init(UINT shaderRegister, D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC, D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP, D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP, D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP, FLOAT mipLODBias = 0, UINT maxAnisotropy = 16, D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL, D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE, FLOAT minLOD = 0.f, FLOAT maxLOD = D3D12_FLOAT32_MAX, D3D12_SHADER_VISIBILITY shaderVisibility = D3D12_SHADER_VISIBILITY_ALL, UINT registerSpace = 0);
};

成员

CD3DX12_STATIC_SAMPLER_DESC ()

创建CD3DX12_STATIC_SAMPLER_DESC的未初始化的新实例。

explicit CD3DX12_STATIC_SAMPLER_DESC (const D3D12_STATIC_SAMPLER_DESC &o)

创建使用另一个D3D12_STATIC_SAMPLER_DESC结构的内容初始化的 CD3DX12_STATIC_SAMPLER_DESC 的新实例。

CD3DX12_STATIC_SAMPLER_DESC (UINT shaderRegister,D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC,D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP,D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP,D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP,FLOAT mipLODBias = 0,UINT maxAnisotropy = 16,D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL, D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,FLOAT minLOD = 0.f,FLOAT maxLOD = D3D12_FLOAT32_MAX,D3D12_SHADER_VISIBILITY着色器Visibility = D3D12_SHADER_VISIBILITY_ALL,UINT registerSpace = 0)

创建CD3DX12_STATIC_SAMPLER_DESC的新实例,初始化以下参数:

UINT shaderRegister

(选择) D3D12_FILTER 筛选器 = D3D12_FILTER_ANISOTROPIC

(选择) D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP

(选择) D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP

(选择) D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP

(选择) FLOAT mipLODBias = 0

(opt) UINT maxAnisotropy = 16

(opt) D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL

(选择) D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE

(选择) FLOAT minLOD = 0.f

(选择) FLOAT maxLOD = D3D12_FLOAT32_MAX

(选择) D3D12_SHADER_VISIBILITY 着色器Visibility = D3D12_SHADER_VISIBILITY_ALL

(选择) UINT registerSpace = 0

static inline Init (D3D12_STATIC_SAMPLER_DESC &samplerDesc, UINT shaderRegister, D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC, D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP, D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP, D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP, FLOAT mipLODBias = 0, UINT maxAnisotropy = 16, D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL, D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,FLOAT minLOD = 0.f,FLOAT maxLOD = D3D12_FLOAT32_MAX,D3D12_SHADER_VISIBILITY着色器Visibility = D3D12_SHADER_VISIBILITY_ALL,UINT registerSpace = 0)

指定初始化以下参数的函数:

& D3D12_STATIC_SAMPLER_DESCsamplerDesc

UINT shaderRegister

(选择) D3D12_FILTER 筛选器 = D3D12_FILTER_ANISOTROPIC

(选择) D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP

(选择) D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP

(选择) D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP

(选择) FLOAT mipLODBias = 0

(opt) UINT maxAnisotropy = 16

(opt) D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL

(选择) D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE

(选择) FLOAT minLOD = 0.f

(选择) FLOAT maxLOD = D3D12_FLOAT32_MAX

(选择) D3D12_SHADER_VISIBILITY 着色器Visibility = D3D12_SHADER_VISIBILITY_ALL

(选择) UINT registerSpace = 0

inline Init (UINT shaderRegister, D3D12_FILTER filter = D3D12_FILTER_ANISOTROPIC, D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP, D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP, D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP, FLOAT mipLODBias = 0, UINT maxAnisotropy = 16, D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL, D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE,FLOAT minLOD = 0.f,FLOAT maxLOD = D3D12_FLOAT32_MAX,D3D12_SHADER_VISIBILITY着色器Visibility = D3D12_SHADER_VISIBILITY_ALL,UINT registerSpace = 0)

指定初始化以下参数的函数:

UINT shaderRegister

(选择) D3D12_FILTER 筛选器 = D3D12_FILTER_ANISOTROPIC

(选择) D3D12_TEXTURE_ADDRESS_MODE addressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP

(选择) D3D12_TEXTURE_ADDRESS_MODE addressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP

(选择) D3D12_TEXTURE_ADDRESS_MODE addressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP

(选择) FLOAT mipLODBias = 0

(opt) UINT maxAnisotropy = 16

(opt) D3D12_COMPARISON_FUNC comparisonFunc = D3D12_COMPARISON_FUNC_LESS_EQUAL

(选择) D3D12_STATIC_BORDER_COLOR borderColor = D3D12_STATIC_BORDER_COLOR_OPAQUE_WHITE

(选择) FLOAT minLOD = 0.f

(选择) FLOAT maxLOD = D3D12_FLOAT32_MAX

(选择) D3D12_SHADER_VISIBILITY 着色器Visibility = D3D12_SHADER_VISIBILITY_ALL

(选择) UINT registerSpace = 0

要求

要求
标头
D3dx12.h

另请参阅

D3D12_STATIC_SAMPLER_DESC

D3D12 的帮助程序结构