Archived

This topic is now archived and is closed to further replies.

D3DTLVERTEX alpha verticies

This topic is 6564 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

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 );

Share this post


Link to post
Share on other sites
I found my mistake .... I forgot to set the alpha operations ... DOH!!!

Share this post


Link to post
Share on other sites