Jump to content
  • Advertisement
Sign in to follow this  

GeForce 400x cards and Multiple Render Target problems

This topic is 2688 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

EDIT: it turns out that going back to an older driver fixed the problem... leaving this silliness up for all to see

Hi, I installed a GeForce 450 GTS today to replace my 9800 GT and immediately noticed that multiple render target code no longer works. I thought I was going crazy but I installed Microsoft's own sample program (PixelMotionBlur) and found that it was not working either. The symptom is that all render targets get the output from COLOR0 written to it ... COLOR1-3 are ignored completely, as verified in PIX. I set up a super simple test program to figure out if there's anything I can do but it's not happening. The relevant bits are as follows. It does nothing but draw a triangle to two render targets in different colors. The pixel shader is compiled for shader model 3. In PIX we see that the render targets have different colors (as I clear them differently) as background but the triangles in both are yellow.

struct BaseFragmentOutput {
float4 _DIFFUSE : COLOR0;
float4 _EMISSIVE : COLOR1;

BaseFragmentOutput main(
float4 position : POSITION,
float4 color : COLOR
BaseFragmentOutput OUT;
OUT._DIFFUSE = float4(1.0f,1.0f,0.0f,1.0f);
OUT._EMISSIVE = float4(0.0f,1.0f,1.0f,1.0f);

return OUT;

g_pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, D3DCOLOR_COLORVALUE(0,0,0,0), 1.f, 0);

g_pd3dDevice->GetRenderTarget(0, &s_pBB);
g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
g_pd3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE);

g_pd3dDevice->SetRenderTarget(0, s_pSurf0);
g_pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, 0x00003F3F, 1.f, 0);

g_pd3dDevice->SetRenderTarget(0, s_pSurf1);
g_pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, 0x0000FFFF, 1.f, 0);

// Begin the scene
if( SUCCEEDED( g_pd3dDevice->BeginScene() ) )
g_pd3dDevice->SetRenderTarget(0, s_pSurf0);
g_pd3dDevice->SetRenderTarget(1, s_pSurf1);
//g_pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, D3DCOLOR_COLORVALUE(0,0,0,0), 1.f, 0);
g_pd3dDevice->SetRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS);

g_pd3dDevice->SetStreamSource( 0, g_pVB, 0, sizeof( CUSTOMVERTEX ) );
g_pd3dDevice->SetFVF( D3DFVF_CUSTOMVERTEX );

g_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLELIST, 0, 1 );

g_pd3dDevice->SetRenderTarget(1, NULL);
g_pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, D3DCOLOR_COLORVALUE(0,0,0,0), 1.f, 0);

g_pd3dDevice->SetRenderTarget(0, s_pBB);
g_pd3dDevice->SetRenderTarget(1, NULL);

// End the scene

I have updated NVIDIA drivers and I'm running WinXP with DX9 (June 2010). There seems to be a real problem here but I'm also confused as all my retail games are working properly and they obviously use deferred rendering so something strange is going on. Anybody run into this before?

Share this post

Link to post
Share on other sites
Thanks for the sharing!
I solve this problem by install the newest driver on Geforce 450 GTS.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!