1019 B
1019 B
D3D12Sampler::GetDesc
函数签名
D3D12_SAMPLER_DESC GetDesc() const
描述
获取 D3D12 采样器的描述符结构。该描述符包含了采样器的所有配置信息,包括过滤模式、寻址模式和细节级别等。
返回值
D3D12_SAMPLER_DESC - 采样器描述符的副本,包含以下配置:
| 字段 | 描述 |
|---|---|
Filter |
过滤模式(线性、点采样、各向异性等) |
AddressU/V/W |
UVW 三个方向的寻址模式 |
MipLODBias |
Mip 级别偏移 |
MaxAnisotropy |
最大各向异性级别 |
ComparisonFunc |
比较函数 |
BorderColor |
边界颜色 |
MinLOD/MaxLOD |
Mip 级别范围 |
示例
D3D12Sampler sampler;
// ... 初始化 sampler ...
D3D12_SAMPLER_DESC desc = sampler.GetDesc();
if (desc.Filter == D3D12_FILTER_MIN_MAG_MIP_LINEAR) {
// 使用线性过滤
}
相关文档
- D3D12Sampler::Initialize - 初始化采样器
- D3D12Sampler - 类总览