   Reading a Structured buffers SRV in the pixel shader
  Hi!I'm currently trying to make a deferred renderer with the help of compute shader and I got a problem with reading the RWStructuredBuffer SRV in my pixel shader.I am pretty sure that the shader resource view works as intended since the values it contains (which are written in the compute shader) are correct in PIX, yet I fail to fetch them in the pixel shader. Here's how I try to do it right now: http://pastebin.org/207048 (code for how I create the SRV and buffer: http://pastebin.org/207082)I set the shader resource like this:pDevContext->PSSetShaderResources(0, 1, &pSRV);The purpose of that shader is to simply write something on to a quad (in this case the buffer). I've spent a few hours trying to figure this out, searching the net and everything, yet failed to find anything useful and now I'm kinda stuck. Any pointers in the right direction would be deeply appreciated!   
  First, the compiler may already do it, but you should just make a static global float4 array of the 4 positions of your vertices and then use the SV_VertexID to index into that array and pull the value.  That would be much faster than using conditionals.Next, you don't need to save the screen space texture coordinate since the SV_Poistion data in the pixel shader contains the pixel center location in the xy components.  After that, it seems that all you'd need is to verify that your pixel location -> index calculation is correct.  Indexing out of bounds on the structured buffer will otherwise just return zero.   ;  Thanks for the pointers! I changed my code according to them and this is what I ended up with: http://pastebin.org/210234I also figured out why I couldn't read the buffer, and it was as simple as unbinding the resource from the output stage (the compute shader).. >_<   