Jump to content
  • Advertisement
Sign in to follow this  
dave

Gradient Alpha Blending

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

Hi, If i have an image in PNG format, how do i gradient the trans parency of the image so one side is 100% opaque and the other side is 100% transparent? I know how to do basic blending using the render states but imnot sure what the source and destination modes should be. thanks for any replies, ace

Share this post


Link to post
Share on other sites
Advertisement
1) Open up the PNG in an image editting program and put a gradient in the alpha channel

or

2) Use individual vertex colours. Set the alpha to 100% on one side and 0 on the other.

Share this post


Link to post
Share on other sites
Quote:
Original post by ace_lovegrove
I know how to do basic blending using the render states but imnot sure what the source and destination modes should be.

Typically SrcBlend = SrcAlpha, DestBlend = InvSrcAlpha

but really it depends on the effect you're trying to achieve

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!