Arsynth
Arsynth

Reputation: 793

Blending operations in Metal

When blending with sourceRGBBlendFactor = sourceAlpha which one alpha value will be taken in formula - original source alpha, calculated in shader or alpha value calculated by sourceAlphaBlendFactor?

Upvotes: 0

Views: 189

Answers (1)

Columbo
Columbo

Reputation: 6766

It's the original source alpha. You can think of these two calculations (MTLBlendOperationAdd) as occurring concurrently.

RGB = Source.rgb * SBF + Dest.rgb * DBF
A = Source.a * SBF + Dest.a * DBF

Upvotes: 1

Related Questions