   Multiple Render Targets problem
  I use the following code to render two texture:pd3dDevice->SetRenderTarget(0, surface0);pd3dDevice->SetRenderTarget(1, surface1);but it seem that the second texture have not been rendering.I check my adapter card's caps and sure it support this way(the NumSimultaneous is 4).And then what hell is the problem, help me!   
Hello,Can you confirm that your shader code working properly ? Cheers   ;Quote:Original post by Demus79Hello,Can you confirm that your shader code working properly ? CheersIn fact i am sure of that because the first texture has been rendered in a right way while the second has not. And the two texture are the same.   ;  Does the debug runtime report any problem?Have you checked it with RefRast?If you don’t mind some parts of your shader code could be useful too.;  Are you outputting 2 colour values inside your shader or just one?I think I did something like this ://Defined in the shaderstruct lightmapOutput {float4 oColour0: COLOR0;float4 oColour1: COLOR1;};//In the pixel shaderOUT.oColour0 = colour0;OUT.oColour1= float4(1.0f, 1.0f, 1.0f, 1.0f);You probably have done this, I'm just making sure you did :).Also when I was writing my deferred renderer I have a few problems with stuff not being written to. I think I had to set each render target to NULL before rebinding them, but I can't remember exactly.Hope this helps.   ;Quote:Original post by weasalmonglerAre you outputting 2 colour values inside your shader or just one?I think I did something like this ://Defined in the shaderstruct lightmapOutput {float4 oColour0: COLOR0;float4 oColour1: COLOR1;};//In the pixel shaderOUT.oColour0 = colour0;OUT.oColour1= float4(1.0f, 1.0f, 1.0f, 1.0f);You probably have done this, I'm just making sure you did :).Also when I was writing my deferred renderer I have a few problems with stuff not being written to. I think I had to set each render target to NULL before rebinding them, but I can't remember exactly.Hope this helps.What a fool i am! i forgot to output the second color!Thank you very much for your help.And forgive me for my asinine mistake!