update API
continuous-integration/drone/push Build is passing Details

main
cosmonaut 2021-01-31 19:57:17 -08:00
parent da1353be9e
commit 9e310c1a50
1 changed files with 2 additions and 2 deletions

View File

@ -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. Remember when we talked about shader uniforms earlier? This is where we apply them.
```cs ```cs
var myVertexUniformOffset = myCommandBuffer.PushVertexShaderParams(myVertexShaderUniforms); var myVertexUniformOffset = myCommandBuffer.PushVertexShaderUniforms(myVertexShaderUniforms);
var myFragmentUniformOffset = myCommandBuffer.PushFragmentShaderParams(myFragmentShaderUniforms); 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. 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.