Jump to content
  • Advertisement

Archived

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

bose

DX8 Object Opacity?

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

How would I set the opacity of an object in DX8? Or create a transparency color on a texture image? Thanks in advance!

Share this post


Link to post
Share on other sites
Advertisement
1. Set your renderstates and texture stage states to enable alpha blending. You set the source for the alpha value here too (vertex, constant [TFACTOR], texture etc).

2. Make sure the source has an alpha channel and it is set to what you require. For textures this means using a texture format with an alpha channel (one with an A in it''s D3DFMT name), and loading it from a file format such as TGA or PNG which contain alpha information.

A search of this forum will reveal plenty of code and info.

A search of the MSDN DirectX site (msdn.microsoft.com/directx) will also reveal code and tutorials.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!