Alpha blending setup

Started by
0 comments, last by Pseudo 21 years, 1 month ago
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?
Advertisement
Check the alpha ref value and if the alpha test is enabled.

Kind regards,
Metron
----------------------------------------http://www.sidema.be----------------------------------------

This topic is closed to new replies.

Advertisement