Jump to content
  • Advertisement


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


Alpha blending setup

This topic is 5603 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 want to draw an object at 98% opacity, however I cant seem to get the modes right. I tried this: device.RenderState.AlphaBlendEnable = false; device.RenderState.SourceBlend = Blend.One; device.RenderState.DestinationBlend = Blend.One; device.TextureState[0].ColorOperation = TextureOperation.SelectArg1; device.TextureState[0].ColorArgument1 = TextureArgument.TextureColor; device.TextureState[0].AlphaOperation = TextureOperation.SelectArg1; device.TextureState[0].AlphaArgument1 = TextureArgument.Diffuse; device.TextureState[1].ColorOperation = TextureOperation.Disable; device.TextureState[1].AlphaOperation = TextureOperation.Disable; And then I set the diffuse color on the verts to about 98% alpha, however it draws nothing. (with blending off it draws the object) What am I doing wrong? is there a simpler way to make the object semi-transparent without having to have a diffuse for each vert?

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!