Jump to content
  • Advertisement
Sign in to follow this  
Quat

Compute Shader

This topic is 2586 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

Hi,

I have seen samples where we access a buffer or texture in a compute shader using bracket operator []. However, I also see some people using Load/Store methods. Is there a difference?

Share this post


Link to post
Share on other sites
Advertisement

Hi,

I have seen samples where we access a buffer or texture in a compute shader using bracket operator []. However, I also see some people using Load/Store methods. Is there a difference?


Using Load and the [] operator are equivalent, there's no difference. Most of the buffer and texture types don't have a "Store" method...it is only supported by RWByteAddressBuffer, which doesn't support the [] operator (because of the special way in which it loads and stores data). So for RWTexture2D/RWBuffer/RWStructuredBuffer the [] operator is the only way to write to it.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!