- 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
540 B
540 B
Material::UpdateConstantBuffer
void UpdateConstantBuffer()
更新材质常量缓冲区。将所有属性值打包到常量缓冲区的二进制数据中,供 GPU 着色器使用。
参数: 无
返回: 无
复杂度: O(n),n 为属性数量
示例:
mat->SetFloat("roughness", 0.5f);
mat->SetFloat3("albedo", Math::Vector3(1.0f, 0.8f, 0.6f));
mat->UpdateConstantBuffer();
auto cbData = mat->GetConstantBufferData();
相关文档
- Material 总览 - 返回类总览