Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Those fading memories...

This topic is 6777 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, please consider this code (it uses execute buffers. I realize this blows the mind of certain posters here, but try to keep it in perspective)... 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_ONE; LPSTATE->drstRenderStateType=D3DRENDERSTATE_DESTBLEND; LPSTATE->dwArg[0]=D3DBLEND_ONE; Oh, this works very nicely-- when I render triangles henceforth, they are blended evenly with eachother. What I want to do in certain instances, however, is fade some triangles away. I succeeded in doing this (very slowly) by adjusting the alpha component of the texture used. However, since I reuse textures, everything on-screen with the ''fading'' texture faded away too. So, my question is, is there any way to say something like D3DBLEND_TWO or D3DBLEND_ONEHALF so that I could fade the triangles out? I only need two steps-- I have it doing one-step right now, and it''s just the teeniest bit too fast. I sort of want to say "Texture Transparency=60%" or something. Anyone played with this? Thanks in advance! -- Goodlife ----------------------------- Think of your mind as a door on a house. Leave the door always closed, and it's not a house, it's a prison. Leave the door always open, and it's not a house, it's a wilderness-- all the vermin creep in.

Share this post

Link to post
Share on other sites
What you want to do is *not* adjust the texture's alpha component, but instead adjust the vertice's alpha component (i.e. in the Vertex structure change the Diffuse and Specular RGBA colors instead of trying to mess with the textures).


Edited by - TheGoop on 4/1/00 12:26:00 PM

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!