Skip to main content

BURN

Constant BURN 

Source
pub const BURN: &str = "// Port of gl-transitions/transitions/burn.glsl\n// Author: gre\n// License: MIT\n// alpha2: the colour is added as premultiplied light where each picture is, not with an\n// alpha of its own, and the sum is clamped to the alpha.\nfn gl_transition(uv: vec2f) -> vec4f {\n    let source = gl_from_color(uv);\n    let destination = gl_to_color(uv);\n    let glow = builtin_premultiply(params.color).rgb;\n    let lit_from = source.rgb + progress() * glow * source.a;\n    let lit_to = destination.rgb + (1.0 - progress()) * glow * destination.a;\n    return builtin_valid(vec4f(\n        mix(lit_from, lit_to, progress()),\n        mix(source.a, destination.a, progress()),\n    ));\n}\n";
Expand description

Hot flash cross-fade transition body.