G''day all, I''m trying to put water over certain tiles. I have managed to do this with blending, but the deal is, I want to make the water MORE transparent in places. Anyone have a code snippet, using d3d IM, that lets me adjust how much I blend my new texture in? I would love to say, like, 10%, 20%, 30% transparency, y''know? THanks in advance. (BTW, here''s what I do to set blend mode right now: LPINSTRUCTION->bOpcode=D3DOP_STATERENDER; LPINSTRUCTION->bSize=sizeof(D3DSTATE); LPINSTRUCTION->wCount=3; .. LPSTATE->drstRenderStateType= D3DRENDERSTATE_ALPHABLENDENABLE; LPSTATE->dwArg=TRUE; ... LPSTATE->drstRenderStateType=D3DRENDERSTATE_SRCBLEND; LPSTATE->dwArg=D3DBLEND_ZERO; ... LPSTATE->drstRenderStateType=D3DRENDERSTATE_DESTBLEND; LPSTATE->dwArg=D3DBLEND_SRCCOLOR; This gives me good blending, but to vary the blending I have to lighten or darken the source image (I.E. blacker pixels in the source image are more transparent, whiter pixels are less). So, without having dozens of unnecessary textures, how could I set it up to give me a variable blend?
Direct3D IM Transparency
No replies to this topic