Skip to content

BlendMode

Defined in: render/blend.ts:12

Mirrors the engine’s BlendMode (src/esengine/renderer/draw/BlendMode.hpp) — the values are serialized into material assets, so they are fixed.

Additive: 1

Defined in: render/blend.ts:16

SrcAlpha, One — glow, particles.


Darken: 7

Defined in: render/blend.ts:28

Takes the darker pixel (GL_MIN).


Lighten: 6

Defined in: render/blend.ts:26

Takes the brighter pixel (GL_MAX).


Multiply: 2

Defined in: render/blend.ts:18

DstColor, OneMinusSrcAlpha — shadows, multiply.


None: 9

Defined in: render/blend.ts:36

No blending — the source replaces the destination. An opaque sprite pays nothing to read the destination it would ignore, and this is the only mode a draw may write depth in, since a blended one must stay in painter’s order.


Normal: 0

Defined in: render/blend.ts:14

SrcAlpha, OneMinusSrcAlpha — the default.


Overlay: 8

Defined in: render/blend.ts:30

Screen on light, Multiply on dark; requires shader support.


PmaAdditive: 5

Defined in: render/blend.ts:24

One, One — additive with a premultiplied-alpha source.


PremultipliedAlpha: 4

Defined in: render/blend.ts:22

One, OneMinusSrcAlpha — for premultiplied-alpha sources.


Screen: 3

Defined in: render/blend.ts:20

One, OneMinusSrcColor — lighten.