DirectX: Questions about Alpha blending !Help !
I think this might answer a few of your questions.
No. It doesn't. But thank you!
Anybody else can help me?
Regarding 1) Where do you take the (as,as,as,as) or (as,rs,gs,bs) statements from?
2) D3DBLEND_SRCBLEND with D3DBLEND_SRCALPHA just tells Direct3d to take the source blend factor for the modulation formula from the source alpha.Whether and how color and alpha is treated is determined by D3DTSS_COLOROP and D3DTSS_ALPHAOP.
5) For color operations all colors are projected as float from 0.0 to 1.0. So 255 (= 1.0) * 255 (= 1.0) becomes 255 (1.0)
Regarding 1) Where do you take the (as,as,as,as) or (as,rs,gs,bs) statements from?
2) D3DBLEND_SRCBLEND with D3DBLEND_SRCALPHA just tells Direct3d to take the source blend factor for the modulation formula from the source alpha.Whether and how color and alpha is treated is determined by D3DTSS_COLOROP and D3DTSS_ALPHAOP.
5) For color operations all colors are projected as float from 0.0 to 1.0. So 255 (= 1.0) * 255 (= 1.0) becomes 255 (1.0)
Thank you a lot. I understand it now.
For Question No.1, (as,as,as,as) is from MSDN. http://msdn.microsoft.com/en-us/library/windows/desktop/bb172508(v=vs.85).aspx
What about Question No.3 ,4 and 6?
I'm not entirely sure on questions 3, 4 and 6, that's why I rather not answer them.
So take these with a grain of salt (answer might be wrong):
3)
I didn't find any mention of separate blending. My guess is you mean multi-pass blending? If you do, it means to build the final color of a pixel by several draw calls after each other.This lets you combine more than two sources for a final image.
4)
Not really as far as I can see. You could however inject your custom factor by changing the vertex alpha or color by using D3DBLEND_SRCCOLOR or D3DBLEND_SRCALPHA. A different way could be changing the material attributes.
6) Not directly as far as I can see. This is a prime example for multi-pass blending though.
I'm not entirely sure on questions 3, 4 and 6, that's why I rather not answer them.
So take these with a grain of salt (answer might be wrong):
3)
I didn't find any mention of separate blending. My guess is you mean multi-pass blending? If you do, it means to build the final color of a pixel by several draw calls after each other.This lets you combine more than two sources for a final image.
4)
Not really as far as I can see. You could however inject your custom factor by changing the vertex alpha or color by using D3DBLEND_SRCCOLOR or D3DBLEND_SRCALPHA. A different way could be changing the material attributes.
6) Not directly as far as I can see. This is a prime example for multi-pass blending though.
Ok. I see.
Thank you so much!