This is something that I cant find a direct answer to.
I've got a constant buffer with world/view/projection matrices that I'm using in the vertex shader, and then another float I need to use in the pixel shader. The matrices read fine, and the float works perfectly if it's read in the vertex shader, but when it is read in the pixel shader it always returns 0.
Can you use constant buffers in pixel shaders? Or is there some special syntax you have to use to share constant buffers between vertex/pixel shaders?
Edit: Or do you have to use a couple constant buffers such that you keep vertex shader cb's and pixel shader cb's separate?
Popular Topics
Advertisement