Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualbelfegor

Posted 27 January 2013 - 08:06 AM

Are you doing something like this? You may need to disable some states after you finish drawing transparent objects.
...
DrawSky();
DrawTerrain();
 
device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
... // other states
 
DrawLeaves();
 
device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); // disable alpha blend
device->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); // i am not sure maybie this one needs to be disabled also

I would like to advise you to take a look at tutorial on http://www.cgtextures.com/ under "Tutorial" menu "Alpha mask background trick".

#1belfegor

Posted 27 January 2013 - 08:03 AM

Are you doing something like this? You may need to disable some states after you finish drawing transparent objects.

 
...
DrawSky();
DrawTerrain();
 
device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
... // other states
 
DrawLeaves();
 
device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE); // disable alpha blend
device->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE); // i am not sure maybie this one needs to be disabled also

PARTNERS