All I'm trying to do at the moment is to blend results of multiple shaders. I can imagine using additional render targets to store color values in the first pixel shader pass and reuse them in the second one. But how could I achieve something similar with vertex shaders?
I've run a very simple test with a single white triangle on the scene. Shader code is included below (with description of what I expect):
//this changes color to violetfloat4 mainPS() : COLOR { return float4(1.0, 0, 1.0, 1.0);}//I'd expect 'c' variable to be the output of previous pass (violet).//If so, the 'c' returned here should be red (ra = 1, gb = 0).//It's unfortunately NOT like that!float4 mainPS2(float4 c : COLOR) : COLOR { c.g=1; c.b=0; return c;}technique technique0 { pass p0 { CullMode = None; VertexShader = compile vs_3_0 mainVS(); PixelShader = compile ps_3_0 mainPS(); } pass p1 { CullMode = None; VertexShader = compile vs_3_0 mainVS2(); PixelShader = compile ps_3_0 mainPS2();}}
I know about Supershaders, but it's rather unsatisfactory solution. Fragment linker is deprecated and no longer supported in DX10. Has anything changed about the issue in DX10 or DX11. Is it any easier there than in DX9?