Update tbuffer

Started by
3 comments, last by fs1 10 years, 3 months ago
Maybe is a very silly question, but how do you update a variable in a tbuffer constant buffer in the shader?

Something like VSSetConstantBuffers does for the cbuffer?

Thanks!
Advertisement

If I remember correctly, tbuffers are bound to shader resource view registers (t#) and you would set them with VSSetShaderResources.

If I remember correctly, tbuffers are bound to shader resource view registers (t#) and you would set them with VSSetShaderResources.

Thanks so much MJP. These also works for constant buffers in the tbuffer? I need to update a float4 buffer binded to a certain slot (register).
Thanks again.

You should check you the Skinning10 sample that comes with the old DirectX SDK. It shows how to use a tbuffer in a shader, and how to bind one for a shader stage.

Honestly though tbuffers aren't really useful. You can accomplish the same thing using a Buffer or a StructuredBuffer.

You should check you the Skinning10 sample that comes with the old DirectX SDK. It shows how to use a tbuffer in a shader, and how to bind one for a shader stage.
Honestly though tbuffers aren't really useful. You can accomplish the same thing using a Buffer or a StructuredBuffer.

Thank you so much, very useful!

This topic is closed to new replies.

Advertisement