transparency?

Started by
5 comments, last by 31337noob 18 years, 1 month ago
how do i do transparency by using IDirect3DTexture9 and a spirte???
Advertisement
I think you may be able to simply put a transparency channel into your spirte artwork and DirectX will automatically recognize the transparency and draw it as such. Make sure to have transparency turned on though.
Quote:Original post by DragonGeo2
I think you may be able to simply put a transparency channel into your spirte artwork and DirectX will automatically recognize the transparency and draw it as such. Make sure to have transparency turned on though.


i dont want it in my artwork. i want a function that will set the transparncey on the fly.
by the way, i want to make the D3DXSPRITE transparencey increase or decrease by pushing buttons.

is it possible to make a spirte transparent?
anyone?

i want to make the whole sprite 50% transparent not just one color.

i know that D3DMATRIAL9 has something called Diffuse.a which sets the transparancey.

but how can i use that toward a sprite???

HRESULT Draw( LPDIRECT3DTEXTURE9 pTexture,
CONST RECT *pSrcRect,
CONST D3DXVECTOR3 *pCenter,
CONST D3DXVECTOR3 *pPosition,
D3DCOLOR Color
);

Set the alpha component of Color to a value between 0 and FF, leaving the RGB components at FF.
Quote:Original post by n0ob

HRESULT Draw( LPDIRECT3DTEXTURE9 pTexture,
CONST RECT *pSrcRect,
CONST D3DXVECTOR3 *pCenter,
CONST D3DXVECTOR3 *pPosition,
D3DCOLOR Color
);

Set the alpha component of Color to a value between 0 and FF, leaving the RGB components at FF.


Thank you friend. it worked. YAY!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

This topic is closed to new replies.

Advertisement