Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


BlendState Problem


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 hossainiir   Members   -  Reputation: 1020

Like
0Likes
Like

Posted 15 December 2012 - 09:35 AM

hi,
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??? Posted Image

خلیج تا ابد فارس

Persian Gulf


Sponsor:

#2 Gavin Williams   Members   -  Reputation: 707

Like
1Likes
Like

Posted 15 December 2012 - 10:41 AM

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, 15 December 2012 - 10:45 AM.


#3 hossainiir   Members   -  Reputation: 1020

Like
0Likes
Like

Posted 15 December 2012 - 12:26 PM

Tnx Gavin Williams.
your code works fine.

خلیج تا ابد فارس

Persian Gulf





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS