D3DTLVERTEX alpha verticies
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 );
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement