Jump to content
  • Advertisement
Sign in to follow this  
giugio

constant buffers and array

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

Hy. I have a shader (shader model 4) and i would set an array of vector4 in the shader with constantbuffers. I see in pix that the vectors that i send to the slot 3 are correct. my array in the shader is defined as: cbuffer skinConstant { float4 skinnedMatricesVS20[4]; } and is the 3rd cbuffer in shader , how i can test if the values in that cbuffer is correct? with pix? how?

Share this post


Link to post
Share on other sites
Advertisement
If you're using pix then you can look at the values in that.

1. Click the render tab in the display section in the bottom.
2. Now the devices in the list to the left of that will become links.
3. Find your draw call or the set call for your buffers. Right click on the device and open that up since it should be a link now.
4. Click on the device tab in the right panes and go to the pixel shader. Somewhere in it's list of cbuffers you should be able to find your skinConstant cbuffer and see all the values in it.

If you don't know exactly what values those should be then I'd change your program to put in some known values and verify those are what you see through pix. I usually set some pattern in my numbers like 135, 246, 123, so I can tell if things are in order.

After that you just have to have faith it's always setting it correctly from what I can tell.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!