Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualAussieSpoon

Posted 29 November 2013 - 09:11 PM

Hello,

 

I am trying to set up alpha to coverage in DirectX 11. I am currently rendering a particle system using instancing and a geometry shader, so that I pass in a point (1 vert) to render all the particles of that particle system. This is what it looks like:

 

8GKe8lA.png

 

I'm trying to set up alpha to coverage but I can't seem to do so. I am getting a problem where it renders a black quad at the particle systems position

 

Here is the Alpha to coverage blend state:

D3D11_BLEND_DESC alphaToCoverageDesc = {0};
alphaToCoverageDesc.AlphaToCoverageEnable = true;
alphaToCoverageDesc.IndependentBlendEnable = false;
alphaToCoverageDesc.RenderTarget[0].BlendEnable = false;
alphaToCoverageDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;

result = device->CreateBlendState(&alphaToCoverageDesc, &AlphaToCoverageBS);

And this is what it looks like:

P9YhyWI.png

 

Even when I try to imitate it within the pixel shader with dithering it produces a similar error:

 

VZlcE4Q.png

 

So I was wondering if it has anything to do with instancing or the geometry shader? I can't imagine it is but I have no idea. Any one think of any reason for this. 

If this is too vague just say

Thanks 


#1AussieSpoon

Posted 29 November 2013 - 09:11 PM

Hello,

 

I am trying to set up alpha to coverage in DirectX 11. I am currently rendering a particle system using instancing and a geometry shader, so that I pass in a point (1 vert) to render all the particles of that particle system. This is what it looks like:

 

8GKe8lA.png

 

I'm trying to set up alpha to coverage but I can't seem to do so. I am getting a problem where it renders a black quad at the particle systems position

 

Here is the Alpha to coverage blend state:

D3D11_BLEND_DESC alphaToCoverageDesc = {0};
alphaToCoverageDesc.AlphaToCoverageEnable = true;
alphaToCoverageDesc.IndependentBlendEnable = false;
alphaToCoverageDesc.RenderTarget[0].BlendEnable = false;
alphaToCoverageDesc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;

result = device->CreateBlendState(&alphaToCoverageDesc, &AlphaToCoverageBS);

And this is what it looks like:

P9YhyWI.png

 

Even when I try to imitate it within the pixel shader with dithering it produces a similar error:

 

VZlcE4Q.png

 

So I was wondering if it has anything to do with instancing or the geometry shader? I can imagine it is but I have no idea. Any one think of any reason for this. 

If this is too vague just say

Thanks 

 


PARTNERS