m_pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, true);
m_pDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
m_pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_DESTALPHA);
m_pDevice->SetTextureStageState(0,D3DTSS_ALPHAARG1,D3DTA_TEXTURE);
Using an overlayed alpha map to clear pixels.
Hi,
I've been struggling with this for a couple of hours. I'm basically drawing an empty texture with each pixel set to ARGB(0,0,0,0) over the top of another textured quad. I want to use the alpha channel of this clear texture to make sections of the textured quad become transparent, but I don't want the clear texture to be drawn at all obviously.
I just can't figure out the RenderStates I need to make this happen as every one I try just draws the supposedly clear texture black with varying levels of opacity from the alpha channel.
I'm currently setting the states like this but I've tried every combination I could think of.
Is this possible using RenderStates, etc, like that or am I going to have to use some other method?
Thanks for any help.
Cheers.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement