Jump to content
  • Advertisement
Sign in to follow this  
mcmc

how to disable background

This topic is 4832 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 got a 3d game that will be like doom and i got a problom i put a shotgun and he have a background! (i already asked this question but i didnt get the answer i needed :\ ) the texture is a BMP is there a way to do this with a BMP? alpha value? someone told me to use mask but i didnt success :if anyone got any idea how to do this plz help me.. thx..

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by mcmc
someone told me to use mask but i didnt success :if anyone got any idea how to do this plz help me..
thx..

The fact you're using a .bmp disallows you from doing alpha-testing. If you can in some way put in an alpha mask, then you'll just have to upload the texture and draw a quad with ALPHA_TEST enabled.
To do this, you may want to use a different format with explicit per-pixel alpha such as .tga or .png (raccomanded) or use two .bmp, one for color and one for alpha. Then load both of them and take RGB from the first, swizzling A from the second.
I don't get how you can not get it working but if you still have problems, post them here.

Share this post


Link to post
Share on other sites
it's possible if you use color keying.
load it the same way as the last method Krohm described.
But instead of a second bitmap you use a special predefinend color to control the alpha.
That color would normaly be "magic pink" or (1.0f,0.0f,1.0f) since it is rarely used.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!