Jump to content
  • Advertisement
Sign in to follow this  
fs1

Update tbuffer

This topic is 2088 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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! Edited by fs1

Share this post


Link to post
Share on other sites
Advertisement

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!