I'm trying to blend a source texture with some snowflakes in Metal, but I can't find blending options that work for my use case.
.
The blending options I'm currently using are:
descriptor.sourceRGBBlendFactor = MTLBlendFactorSourceAlpha;
descriptor.sourceAlphaBlendFactor = MTLBlendFactorOne;
descriptor.destinationRGBBlendFactor = MTLBlendFactorOne;
descriptor.destinationAlphaBlendFactor = MTLBlendFactorOne;
I've tried these.
I expected the blue portion of the snowflakes to blend with the blue background, not with the underlying one.
Can anyone explain to me what I'm getting wrong, what the correct formula should be and how we arrive to it?