Advertisement

D3DTLVERTEX alpha verticies

Started by January 27, 2000 02:48 AM
0 comments, last by Ro 25 years, 1 month ago
I''ve been struggling with this for almost forever now, and can''t seem to figure out how to dynamically make my bitmap translucent. I''m using D3DTLVERTEX and was attempting to just change the alpha values for the verticies, but that didn''t affect the translucency rendering. I also tried setting different values for the current device material, and different rendering states. Here is my rendering state if it helps any: d3d_device->SetRenderState( D3DRENDERSTATE_COLORKEYENABLE, TRUE ); d3d_device->SetRenderState( D3DRENDERSTATE_ALPHABLENDENABLE, TRUE ); d3d_device->SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA ); d3d_device->SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA ); d3d_device->SetRenderState( D3DRENDERSTATE_AMBIENT, 0x00000000 ); d3d_device->SetRenderState( D3DRENDERSTATE_DITHERENABLE, TRUE ); d3d_device->SetRenderState( D3DRENDERSTATE_SPECULARENABLE, FALSE ); d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE ); d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE ); d3d_device->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_MODULATE ); d3d_device->SetTextureStageState( 0, D3DTSS_MINFILTER, D3DTFN_LINEAR ); d3d_device->SetTextureStageState( 0, D3DTSS_MAGFILTER, D3DTFG_LINEAR ); d3d_device->SetTextureStageState( 0, D3DTSS_ADDRESS, D3DTADDRESS_CLAMP );
I found my mistake .... I forgot to set the alpha operations ... DOH!!!

This topic is closed to new replies.

Advertisement