Sign in to follow this  

transparency?

This topic is 4301 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

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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???

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Share this post


Link to post
Share on other sites

This topic is 4301 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this