Jump to content
  • Advertisement
Sign in to follow this  

alpha channel

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

im hoping someone can shed some light on this becuase its makes no sense to me. im creating a game in C# and have just successfully made a fade in / fade out effect using directX sprite calls and changing the alpha value. it works perfectly, but becuase I have an animation (which the frames are stored in a tileset bitmap) I have to make two calls, one to Sprite.Draw and one to Sprite.Draw2D. I use the sprite.Draw function b/c it lets me specify the rectangle to draw within the tileset. Now heres the problem..... The rates of the fading are not the same. The calls are back to back, so the m_Alpha value doesnt change, but the animated rectangle fades in slower than the non animated section. for example, I do a call to BGSprite.Draw2D(m_Texture, new Point(0, 0), 0f, new Point(0, 0), Color.FromArgb(m_Alpha, Color.White)); BGSprite.Draw(m_Texture, m_Options[OptionIndex].GetCurrentCoordinates(), Vector3.Empty, m_OptionCoords, Color.FromArgb(m_Alpha, Color.White)); i hope you understand my problem. i have no idea why its doing what it does. Thanks!

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!