More alpha blending headaches...
I'm hoping this is simple but it's frustrating me. What I have is a texture composed solely of an alpha channel (ie the RGB is white). I want to draw the texture on triangles so that the alpha channel modulates the color value of the vertexes, which are TransformedColoredTextured. Basically this is for displaying bitmap fonts that I can draw in any color.
What combos of TextureState's do I need to get this to work?
Also, where can one find a detailed user's guide for using alpha & TextureStates???
This is for C++ and out of my head but ought to be easy to convert:
SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE );SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 );SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA );SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA );
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement