A: 

The math seems correct, and the way you set the DirectX functions should work.

My advice is:

  1. Use the same images that you are using in Photoshop so you know it's not correctly making pure white (possible).
  2. Check that you can do other blending modes and that they generate the correct output.

    • apologies if you have already done both of those.
CiscoIPPhone
Thank you. I've added screenshots to the header
kFk
+2  A: 

Following line is wrong:

pD3DDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_ADD);

Your intention is probably to state alpha blender should do ADD, but the D3DTSS_COLOROP setting does not affect final blender, it sets texture combiner instead. You set it to add something (result of previous/following stage, or something like that) to the color you sample from the texture, which is wrong. D3DTOP_SELECTARG1 or default D3DTOP_MODULATE should do the job.

What you need to write instead is:

pD3DDevice->SetRenderState(D3DBLENDOP, D3DBLENDOP_ADD);
Suma
Thank you. Proper render state is D3DRS_BLENDOP in DirectX8. I've fixed my test project but the result is still different with Photoshop. You can see screenshots and sample project in header.
kFk
As the page you have linked to writes, you need to have your image in pre-multiplied alpha representation.
Suma