Hi,
I have been trying to achieve alpha blending in XNA. I don't want to use the Spritebatch class. I have tried playing around with the renderstate and setting a colour key.
Code to create Colourkey:
Code setting renderstate:Code:TextureCreationParameters tt = new TextureCreationParameters(); tt = TextureCreationParameters.Default; tt.ColorKey = new Color(0, 0, 0); tt.Format = SurfaceFormat.Rgba32; inSheet.texData = Texture2D.FromFile(device, assetName, tt);
Have I gone mad and tried to use XNA like DX9?Code:device.RenderState.AlphaSourceBlend = Blend.SourceAlpha; device.RenderState.AlphaDestinationBlend = Blend.InverseSourceAlpha; device.RenderState.AlphaBlendEnable = true;![]()
Or is there a way?
Find my whole project attached.


Reply With Quote
