Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Direct3D IM Transparency


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   -  Reputation: 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?

Sponsor:



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.



PARTNERS