Function body

Source
pub fn body(kind: EffectKind) -> Option<&'static str>
Expand description

Body for each EffectKind that runs on the GPU. None = geometric or CPU-only.

A body is a complete shader minus the prelude: it defines void main(), samples tex itself and ends with out_color = mix(src, res, m) so masking is explicit (see the rules by the bodies). Parameters arrive as p0..p7 in EffectKind::params() order (a kind with more declares the extras itself); pixel-sized ones must be multiplied by u_scale.