How to get transparent mesh
Hi I have a tree mesh with a texture with alpha channel. Which renderstates should I use to get the alpha channel to be transparent?
Device.RenderState.SourceBlend = Blend.SourceAlpha;
Device.RenderState.DestinationBlend = Blend.InvSourceAlpha;
Device.RenderState.AlphaBlendEnable = true;
I hope this helps.
Take care.
Device.RenderState.DestinationBlend = Blend.InvSourceAlpha;
Device.RenderState.AlphaBlendEnable = true;
I hope this helps.
Take care.
If you have no alpha channel in the render target (including your frame buffer), you can set the source alpha to SRCALPHA and destination to INVSRCALPHA or ONE.
If you have alpha channel in the render target, you can set the source alpha to SRCALPHA and destination to DESTALPHA.
The best way is to experientment with the alpha blending settings by your self to archieve what you really need. As with the whole mesh transparent, you can choose to disable back face culling to make it sees both sides of the mesh.
If you have alpha channel in the render target, you can set the source alpha to SRCALPHA and destination to DESTALPHA.
The best way is to experientment with the alpha blending settings by your self to archieve what you really need. As with the whole mesh transparent, you can choose to disable back face culling to make it sees both sides of the mesh.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement