• Advertisement
Sign in to follow this  

BlendState Problem

This topic is 1864 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 have a problem with BlendState, before insert the following codes everything works fine in my app but after setting codes everything in my rendering panel disapear.
i test the app with PIX after inserting the codes, ShaderResources,VertexBuffers,IndexBuffers and every thing was ok!!!!

var des = new BlendStateDescription {IndependentBlendEnable = false};
Context.OutputMerger.BlendState = BlendState.FromDescription(Device,des);          
why??? sad.png

Share this post

Link to post
Share on other sites
Can you please include the description.

Edit : Oh, that is your description.

Edit2 : What happens if you provide this blend description ..

// blend supporting transparency
BlendStateDescription bsd1 = new BlendStateDescription()
IndependentBlendEnable = false,
AlphaToCoverageEnable = false,
bsd1.RenderTargets[0] = new RenderTargetBlendDescription();
bsd1.RenderTargets[0].BlendEnable = true;
bsd1.RenderTargets[0].RenderTargetWriteMask = ColorWriteMaskFlags.All;

bsd1.RenderTargets[0].SourceBlend = BlendOption.SourceAlpha;
bsd1.RenderTargets[0].BlendOperation = BlendOperation.Add;
bsd1.RenderTargets[0].DestinationBlend = BlendOption.InverseSourceAlpha;

bsd1.RenderTargets[0].SourceBlendAlpha = BlendOption.One;
bsd1.RenderTargets[0].BlendOperationAlpha = BlendOperation.Add;
bsd1.RenderTargets[0].DestinationBlendAlpha = BlendOption.One;

BlendState_Transparent = BlendState.FromDescription(Device11, bsd1);
BlendState_Transparent.DebugName = "BlendState_Transparent";
Edited by Gavin Williams

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement