Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actualbelfegor

Posted 25 May 2013 - 02:41 PM

I think in second pass you don't need to write to zbuffer, try adding this:

 

...
device->SetRenderState( D3DRS_ZWRITEENABLE, FALSE ); // disable
Object.Draw();
device->SetRenderState( D3DRS_ZWRITEENABLE, TRUE ); // reenable after done with "lightning objects"

 

Does that solve z-fighting?


#2belfegor

Posted 25 May 2013 - 02:38 PM

I think in second pass you don't need to write to zbuffer, try adding this:

 

...
device->SetRenderState( D3DRS_ZWRITEENABLE, FALSE ); // disable
Object.Draw();
device->SetRenderState( D3DRS_ZWRITEENABLE, TRUE ); // reenable after done with "lightning objects"

#1belfegor

Posted 25 May 2013 - 02:38 PM

I think in second pass you don't need to write to zbuffer, try adding this:

...
device->SetRenderState( D3DRS_ZWRITEENABLE, FALSE ); // disable
Object.Draw();
device->SetRenderState( D3DRS_ZWRITEENABLE, FALSE ); // reenable after done with "lightning objects"

PARTNERS