Problem getting alpha blending to work with point sprites
I have a particle system that I can initialize to use either point sprites or billboards. When using billboards, the alpha blending works fine. But when I change to using point sprites, using the same effect file, the alpha blending doesn't work and nothing appears on screen. If I disable the following alpha blending code in the effect file:
AlphaBlendEnable = true;
SrcBlend = SrcAlpha;
DestBlend = InvSrcAlpha;
ZWriteEnable = false;
the point sprites appear (although without blending, obviously) so there is clearly no issue with the point sprites being too small to see.
Thoughts?
Your comment turned on a lightbulb for me and I found the problem.
I had this in my effect file:
Output.Color = tex2D(TextureSampler, TextureUV) * Diffuse;
I changed it to this:
Output.Color = tex2D(TextureSampler, TextureUV) * float4(Diffuse.xyz, 1);