From 9e310c1a500a2c86d3aaf132ea5a51293efaea3c Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Sun, 31 Jan 2021 19:57:17 -0800 Subject: [PATCH] update API --- content/Graphics/CommandBuffer/_index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/Graphics/CommandBuffer/_index.md b/content/Graphics/CommandBuffer/_index.md index 632df03..0e0695a 100644 --- a/content/Graphics/CommandBuffer/_index.md +++ b/content/Graphics/CommandBuffer/_index.md @@ -52,8 +52,8 @@ Note that if you need to use multiple graphics pipelines that all share a render Remember when we talked about shader uniforms earlier? This is where we apply them. ```cs -var myVertexUniformOffset = myCommandBuffer.PushVertexShaderParams(myVertexShaderUniforms); -var myFragmentUniformOffset = myCommandBuffer.PushFragmentShaderParams(myFragmentShaderUniforms); +var myVertexUniformOffset = myCommandBuffer.PushVertexShaderUniforms(myVertexShaderUniforms); +var myFragmentUniformOffset = myCommandBuffer.PushFragmentShaderUniforms(myFragmentShaderUniforms); ``` Note that these offset values are later accepted by the draw calls, and also note that you can pass multiple shader uniform structs at once. Remember that sending data between the CPU and GPU is expensive and we want to do that as infrequently as possible. Batching your uniform updates minimizes data transfer.