constant buffers and array

Started by
0 comments, last by BattleCollie 14 years, 6 months ago
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?
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.

This topic is closed to new replies.

Advertisement