Strange alphachannel blending when painting to a DirectX Rendertarget

Started by
10 comments, last by Juliean 1 month, 2 weeks ago

triangle_eggbeater669 said:
So issue is solved, but I dont really understand why you have to use different BlendStates for painting to the Backbuffer and to a RenderTarget, but I guess this comment:

I guess it's rather the fact that the backbuffer has no alpha-channel to begin with, at least it shouldn't have, usually.

triangle_eggbeater669 said:
Painted to transparent RenderTarget with SourceBlend = SourceAlpha DestinationBlend = InverseSourceAlpha SourceAlphaBlend = One DestinationAlphaBlend = InverseSourceAlpha

Hmmm I'm trying to wrap my head around what the actual Alpha-target values mean :D Since “One” outputs the alpha-value of the current shader to the target, I guess "SourceAlphaBlend = SourceAlpha" would result in Alpha * Alpha being output, which could maybe explain some of the issues (depending on if that alpha is also used to blend the color, or if the colors being off is just an artifact of how the alpha-channel interacts with it - probably the latter. Well, glad you solved it yourself 🙂

This topic is closed to new replies.

Advertisement