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.


Dark particles almost disappear in game


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 five1mon   Members   -  Reputation: 152

Like
0Likes
Like

Posted 07 May 2013 - 04:17 AM

Hey

I’m having this problem with transparency on particles that I can’t really get my head around. It appears that bright alpha blended particles show up much more pronounced in game than dark ones. I hacked the pixel shader so that I could toggle the output RGB from darkest (0.0f) to brightest (1.0f), with alpha value identical. I would have expect both to contribute approximately the same, maybe appear a little different dependent on the background but as you can see the dark particles almost disappear:

 

alpha_blending_dark-1.jpgalpha_blending_bright.jpg

 

Does anybody know why this might be happening? The platform I'm running on is PC, Directx11. I took a look in some profiling tools the black smoke are written to the colour buffer with the format DXGI_FORMAT_R16G16B16A16_FLOAT. The blend settings are:

 

        RenderTarget[0]      

            BlendEnable           1

            SrcBlend   D3D11_BLEND_SRC_ALPHA

            DestBlend                D3D11_BLEND_INV_SRC_ALPHA

            BlendOp   D3D11_BLEND_OP_ADD

            SrcBlendAlpha       D3D11_BLEND_SRC_ALPHA

            DestBlendAlpha    D3D11_BLEND_INV_SRC_ALPHA

            BlendOpAlpha       D3D11_BLEND_OP_ADD

            RenderTargetWriteMask  D3D11_COLOR_WRITE_ENABLE_ALL

 

I tried with a few different blend settings with no improvement. I tried pre-multiplied alpha as well. Each particle is setup to have a small alpha value if I crank it up the dark particles appear more but that makes the bright particles over-saturated. I need to have dynamically both bright and dark particles from the same emitter as I'm applying lighting to the particles. Has anybody come across this problem before?

 

 

Thanks,

Simon



Sponsor:

#2 eppo   Crossbones+   -  Reputation: 2621

Like
0Likes
Like

Posted 07 May 2013 - 10:25 AM

Blend state looks fine. The dark smoke in the left picture should be just as visible as white smoke on the right.

Are you sure you're setting the RGB values to zero and not the alpha value? What happens when you try writing out different colors?

 

 Each particle is setup to have a small alpha value if I crank it up the dark particles appear

 

Is this an additional alpha value next to what's stored in the texture?


Edited by eppo, 07 May 2013 - 10:29 AM.


#3 mikiex   Members   -  Reputation: 244

Like
0Likes
Like

Posted 11 May 2013 - 03:21 PM

Well there is no reason to be blending the targets alpha SrcBlendAlpha DestBlendAlpha ?

I'm not saying thats the problem though, but thought I would point it out.

These are normally set to one or zero.






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