Hello,
I'm trying to implement a particle system and the only major issue that seems obvious happens during the blending process of the particles.
Here's the result I'm getting: http://postimg.org/image/w9o9teg6r/
Blend settings:
D3D11_RENDER_TARGET_BLEND_DESC rtbDesc;
rtbDesc.BlendEnable = true;
rtbDesc.SrcBlend = D3D11_BLEND_SRC_ALPHA;
rtbDesc.DestBlend = D3D11_BLEND_DEST_ALPHA;
rtbDesc.BlendOp = D3D11_BLEND_OP_ADD;
rtbDesc.SrcBlendAlpha = D3D11_BLEND_SRC_ALPHA;
rtbDesc.DestBlendAlpha = D3D11_BLEND_ONE;
rtbDesc.BlendOpAlpha = D3D11_BLEND_OP_ADD;
rtbDesc.RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
As you can see, the particles are far too "bright" before they fade away. However, any other setting I've tried, I keep getting this type of flickering result: http://postimg.org/image/eell6mrf1/ (static screenshot: http://postimg.org/image/x282i3oin/)
I think a way to fix this would be to sort the particles in the order of their alphas and then use the "normal" blending settings (src and dest as SRC_ALPHA and INV_SRC_ALPHA) but that is out of the question as I'm using the compute shader with append/consume buffers to simulate the particles. Reading the data back to CPU, sorting it and then sending it for rendering would negate half the reasons for using the compute shader and keeping the memory transfers from CPU->GPU only for constant buffers.
Any help would be greatly appreciated!