maen Posted December 16, 2003 Posted December 16, 2003 Hello every one, I am trying to make a loaded mesh transparent , in VB.net and DirectX9 this is the code in the InitializieDevice , Is there anything thing wrong ? ' Turn on the zbuffer dev.RenderState.ZBufferEnable = True ' Turn on ambient lighting dev.RenderState.Ambient = System.Drawing.Color.White dev.RenderState.AlphaBlendEnable = True dev.RenderState.AlphaSourceBlend = Blend.SourceAlpha dev.RenderState.DestinationBlend = Blend.DestinationAlpha ' Load the mesh from the specified file mesh = mesh.FromFile("box.x", MeshFlags.SystemMemory, device, materials) Quote
hog Posted December 16, 2003 Posted December 16, 2003 The only diffeence in your code to that in my book is this line: dev.RenderState.DestinationBlend = Blend.InvSourceAlpha Don't know if that helps? Quote My website
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.