Are we talking about Dx9? The old fixed function pipeline kicks in, if no vertex shader is bound but with Dx10/11 a vertex shader is required. (At least it yells error messages in the output window at me. ) If you don’t explicitly write in the effect pass “SetVertexShader( 0 );” the vertex shader of the last effect is still bound (Dx10/11) – a very dangerous behavior.
but actually a vertex shader can be left out..i wrote a pass without a vertex shader before and it works well..
Edit: I've just seen the XNA tag. In that case I'd expect that the last vertex shader was still bound. Otherwise I wasn't aware that XNA still has the fixed-function pipeline behind the scenes.
That’s indeed strange. I don’t have a good answer for that, sorry.
i thought the structure has nothing to do with the compiling..but he changed the 'SCREEN_SIZE' and the error disappeared..
why the structure caused the compiling error..it seems that the structure has nothing to do with compiling?
Did you take a look at the ParticlesGS sample in the DxSDK? If you don’t dependent on Dx9 it might be easier and faster to use the stream output instead of textures to store the state of the particles.
i want to write a GPU particle system, and need a structure to save the data of the texture consisting of all particles.So what type of structure should i use?
Edit: Alright, irrelevant for you because of XNA.