BlendState class final

How a draw is combined with what the attachment already holds.

A value type with ==, so a backend can cache one native object per distinct state and a test can assert on the state a pass was left in — the same two reasons SamplerOptions is one.

The field set and the defaults are flutter_gpu's, unchanged, which is what makes alphaBlend exactly the equation the engine used to get by constructing an empty ColorBlendEquation.

Constructors

BlendState({BlendOperation colorOperation = BlendOperation.add, BlendFactor sourceColorFactor = BlendFactor.one, BlendFactor destinationColorFactor = BlendFactor.oneMinusSourceAlpha, BlendOperation alphaOperation = BlendOperation.add, BlendFactor sourceAlphaFactor = BlendFactor.one, BlendFactor destinationAlphaFactor = BlendFactor.oneMinusSourceAlpha})
const

Properties

alphaOperation → BlendOperation
final
colorOperation → BlendOperation
final
destinationAlphaFactor → BlendFactor
final
destinationColorFactor → BlendFactor
final
hashCode → int
The hash code for this object.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sourceAlphaFactor → BlendFactor
final
sourceColorFactor → BlendFactor
final
usesBlendColor → bool
Whether any of the four factors reads the constant PassEncoder.setBlendColor sets.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
override

Constants

additive → const BlendState
Both terms added. What particles and the bloom upsample draw with.
alphaBlend → const BlendState
Source over destination, with the source colour taken as premultiplied — the source factor is BlendFactor.one and not sourceAlpha. What transparent materials draw with.
keepDestination → const BlendState
The attachment kept exactly as it was: nothing of the source, all of the destination.