I have a scene that I render to a texture (works fine). I keep a copy of that texture, which I use to create a blur in the X and Y direction so now I have:
a) The original texture of the scene
b) A blurred copy of the scene on the device's default rendertarget
I now want to draw the original texture on top, giving it the "blur" around the original scene data. When I do this, however, it just completely replaces everything; my blurred scene is wiped out and the original replaces it entirely, as if StretchRect can do no combining or blending.
I turn on Alpha blending and set the blending mode to Additive (also tried AlphaAdditive):
pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
BlendMode::Set(pd3dDevice, BlendMode::Additive);
pd3dDevice->StretchRect(ptrDrawSurface, NULL, ptrOriginalDeviceRenderTarget, NULL, D3DTEXF_POINT);
So what am I missing? How do I get the original version of the scene to be placed on top of the blurred version of the scene without it just completely replacing it?
Thanks!