   Pixel Shader Question
  I am having a really tough time trying to word this question so bear with me.In the HLSL pixel shader, is every pixel updated by each instruction before moving onto the next instruction or can no such guarantee be made?For example does it work like: (pseudo code)for each pixel    op1for each pixel    op2for each pixel    op3or does it work like: (pseudo code)for each pixel    op1    op2    op3endBasically I need to use the result of all the pixels for the next operation. If the pixel shader runs like the ladder then how can I get the output I desire? Do I need multiple pixel shaders and multiple passes in the renderer?   
  It's illegal to have a texture be bound to a texture stage and be a render target at the same time.  As such, the order really doesn't matter.   ;  Maybe I should clarify, my pixel shader needs to do some calculations based on an input texture, output to a different temp texture. Then do some more calculations based on the temp texture and then finishes. But I need the entire temp texture for the second part of the calculation.   ;  Each pixel is processed completely independent of all other pixels. The only guarantee you have is that that particular pixel will be processed in a sequential order. (op1 will be performed before op2 on that pixel)Most graphics cards process a bunch of pixels in parallel (Geforce 7 can do 20-24 simultaneously, for example)   ;  You would first need to do a drawing call to render to the texture, then pass that texture to a shader where you would use that texture to render to the back buffer.There is a chapter on this in Frank's newest book.;  Thanks for the clarification guys.   