Those fading memories...

Started by
0 comments, last by Goodlife 24 years ago
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.
-- Goodlife-----------------------------Those whom the gods would destroy, they first drive mad.--DirectX design team official motto
Advertisement
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).

--TheGoop

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

This topic is closed to new replies.

Advertisement