effectBlendModeFor function
Framebuffer blend mapping for an EffectDrawCommand.blend.
Not the fbs.BlendType enum — an emitter's blend is the SS6-style raw
byte 0 = Mix, 1 = Add, and anything else falls back to Mix (the runtime
says so, and ForGodot agrees). Passing it through blendModeFor would
read 1 as BlendType.Mul and silently turn every additive particle into a
multiply, so the two mappings stay separate on purpose.
The additive row is (ONE, ONE, ONE, ONE) upstream — alpha adds too, unlike
the batch-level Add, whose alpha stays on source-over — and plus is exactly
that on all four channels.
Implementation
ui.BlendMode effectBlendModeFor(int blend) =>
blend == 1 ? ui.BlendMode.plus : ui.BlendMode.srcOver;