Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Direct3D IM Transparency

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
No replies to this topic

#1 Goodlife   Members   

122
Like
Likes
Like

Posted 29 January 2000 - 12:50 AM

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[0]=TRUE; ... LPSTATE->drstRenderStateType=D3DRENDERSTATE_SRCBLEND; LPSTATE->dwArg[0]=D3DBLEND_ZERO; ... LPSTATE->drstRenderStateType=D3DRENDERSTATE_DESTBLEND; LPSTATE->dwArg[0]=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?




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.