Skip to main content

Module blend

Module blend 

Source
Expand description

Blend modes for crate::Layers (ffcine.comp.blend/1 mode, Resolve’s composite modes): the W3C compositing formulas (Photoshop’s where W3C has none), as a CPU reference and as the GLSL the backend’s composite pass runs. Both work on encoded RGB in 0..1 (the output’s transfer), the backdrop opaque: out = (1 − a) · b + a · B(b, s) with a the layer’s alpha times its opacity.

Enums§

BlendMode
How a layer combines with the picture under it.

Functions§

glsl
GLSL for the composite pass: vec3 blend_mode(int mode, vec3 b, vec3 s), the same formulas as BlendMode::apply, mode as BlendMode::index.