Jump to content
  • Advertisement


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

RXB gamer

Alpha blending isn't.....uh....conforming?

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

Ok, so I''ve wanted to get alpha blending to work with my game for awhile now, so I finally decided to do it. But it isn''t working the way I want it to (typical). I''m pretty sure I got the settings right.... { lpDevice->SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); lpDevice->SetRenderState(D3DRENDERSTATE_SRCBLEND,D3DBLEND_SRCALPHA); lpDevice->SetRenderState (D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); } I''ve tried setting the object''s material''s alpha values to 0.0, 0.5, and 1.0 but I get the same result every time: nothing. It doesn''t effect it at all. It''s like the alpha values are always 1. Did you forget a render state or something? When they come for me I''''ll be sittin'''' in my desk with a gun in my hand wearing a bullit-proof vest singing "My, my, my, how the time does fly when you knw your gonna die by the end of the night!"

Share this post

Link to post
Share on other sites
What are your TextureStageStates set to ? - they specify how the alpha value gets from the source data to the polygon blending stage.

For example if you had alpha in your texture you might do:


Also make sure the source data is in a format which contains alpha - for example if it''s your texture, make sure the texture has alpha (e.g. D3DFMT_A8R8G8B8).

Or are you trying to have realtime lighting at the same time as controlled alpha ?

Simon O''Connor
Creative Asylum Ltd

Share this post

Link to post
Share on other sites
Have you set the corresponding renderstate D3DRS_DIFFUSEMATERIALSOURCE to D3DMCS_MATERIAL ? Otherwise the default is to take the vertex alpha and not the material one.

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!