Alpha Blending when Rendering to texture! HELP!

Started by
3 comments, last by neneboricua19 18 years, 5 months ago
I have some problems doing alpha blending while rendering to some texture. Exactly I have render target, and i am using AlphaBlendEnable=true, SrcBlend=one; DstBlend=one; but all seem to work when dont have render target. But when I set render target then it is all rendering as if I had AlphaBlending=false; Problem: I need to render particle systems and all scene to one final render target and later do some post processing...
If you don`t do something, something will do, something to you!
Advertisement
Are you rendering to a floating point render target? Most of the hardware currently available is not able to perform alpha blending when rendering to these kinds of surfaces.

neneboricua
It should work unless you're using an FP target, as neneboricua said. Another to check is that you are't setting alphasrcblend and alphadestblend which are used to blend a final alpha value seperately from color.
Well. I am rendering to FP surface... I need to render to fp surface. is there anyway i can do this. I want to render everything on scene to fp surface in order to make HDR, and also want to make my particles in that. How modern engines solve this if it is not possible to render to fp surface.
If you don`t do something, something will do, something to you!
There are two ways this is normally done. The first is to render your particles at a later stage when you're using a non-floating point target.

The other option is to perform the alpha blending yourself in your pixel shader. To do this, you would need to use two render targets and alternate between them.

neneboricua

This topic is closed to new replies.

Advertisement