update API
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
da1353be9e
commit
9e310c1a50
|
@ -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.
|
||||||
|
|
Loading…
Reference in New Issue