Skip to main content
GameDev.net gamedev.net
🔒 Locked

Multiple Render Targets problem

Started by sogetsu Jun 8, 2006 at 3:34 AM 4 replies 1.7k views
Original Post
sogetsu
sogetsu
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!
Demus79
Demus79

Hello,

Can you confirm that your shader code working properly ?

Cheers
sogetsu
sogetsu
Quote:
Original post by Demus79

Hello,

Can you confirm that your shader code working properly ?

Cheers


In 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.
Demirug
Demirug
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.
weasalmongler
weasalmongler
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.
sogetsu
sogetsu
Quote:
Original post by weasalmongler
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.


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!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.