Files
XCSDD/docs/api/rhi/d3d12/root-signature/create-static-sampler.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling
- Improve link styling with underline decoration
- Hide leaf nodes from tree, only show directories
- Fix log file path for packaged app
2026-03-19 12:44:08 +08:00

40 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# D3D12RootSignature::CreateStaticSampler
## 函数签名
```cpp
static D3D12_STATIC_SAMPLER_DESC CreateStaticSampler(uint32_t shaderRegister, const D3D12_SAMPLER_DESC& desc, ShaderVisibility visibility = ShaderVisibility::Pixel)
```
## 中文描述
创建静态采样器描述符,静态采样器绑定到根签名中无需描述符堆。
## 参数
| 参数 | 类型 | 描述 |
|------|------|------|
| `shaderRegister` | `uint32_t` | 着色器寄存器编号 |
| `desc` | `D3D12_SAMPLER_DESC` | 采样器描述符 |
| `visibility` | `ShaderVisibility` | 可见性(默认 Pixel |
## 返回值
`D3D12_STATIC_SAMPLER_DESC` - 静态采样器描述符
## 复杂度
O(1)
## 示例
```cpp
D3D12_SAMPLER_DESC samplerDesc = D3D12RootSignature::CreateSamplerDesc(FilterMode::Anisotropic, TextureAddressMode::Wrap);
D3D12_STATIC_SAMPLER_DESC staticSampler = D3D12RootSignature::CreateStaticSampler(0, samplerDesc);
```
## 相关文档
- [D3D12RootSignature](root-signature.md) - 类总览
- [D3D12RootSignature::CreateSamplerDesc](create-sampler-desc.md) - 创建采样器描述符