docs: update RHI API docs
This commit is contained in:
36
docs/api/rhi/d3d12/shader/set-float.md
Normal file
36
docs/api/rhi/d3d12/shader/set-float.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# D3D12Shader::SetFloat
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
void SetFloat(const char* name, float value) override
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
设置着色器中的浮点型 uniform 变量。当前实现为空(stub)。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `name` | `const char*` | 变量名称 |
|
||||
| `value` | `float` | 变量值 |
|
||||
|
||||
## 返回值
|
||||
|
||||
无
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
shader->SetFloat("scale", 2.0f);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Shader](shader.md) - 类总览
|
||||
- [SetInt](set-int.md) - 设置整型 uniform
|
||||
- [SetVec3](set-vec3.md) - 设置 Vec3 uniform
|
||||
- [SetVec4](set-vec4.md) - 设置 Vec4 uniform
|
||||
- [SetMat4](set-mat4.md) - 设置矩阵 uniform
|
||||
Reference in New Issue
Block a user