/** * Shared GLSL around each transition body. * `readFrom` / `readTo` already swap roles when playing in reverse, so a * transition only writes the forward animation. * Reads outside [0, 1] return transparent black. Reads are premultiplied, * so transitions can mix and average them directly. */ export declare const PRELUDE = "#version 300 es\nprecision highp float;\nin vec2 uvContent;\nout vec4 outColor;\nuniform sampler2D from;\nuniform sampler2D src;\nuniform vec4 srcRectUv;\nuniform float t;\nuniform float reverse;\nuniform vec2 resolution;\nuniform float time;\n\nbool inRange(vec2 p) {\n return all(greaterThanEqual(p, vec2(0.0))) && all(lessThanEqual(p, vec2(1.0)));\n}\nvec4 readFrom(vec2 p) {\n if (!inRange(p)) return vec4(0.0);\n return reverse > 0.5 ? texture(src, srcRectUv.xy + p * srcRectUv.zw) : texture(from, p);\n}\nvec4 readTo(vec2 p) {\n if (!inRange(p)) return vec4(0.0);\n return reverse > 0.5 ? texture(from, p) : texture(src, srcRectUv.xy + p * srcRectUv.zw);\n}\n"; /** Output is premultiplied, so antialiased edges and blur past the element keep their alpha. */ export declare const MAIN = "\nvoid main() {\n outColor = transition(uvContent, reverse > 0.5 ? 1.0 - t : t);\n}\n"; export declare function buildFrag(body: string): string; /** Line in the full shader where the transition body starts, minus one. */ export declare const BODY_OFFSET: number; /** * Turn a WebGL compile error into lines that point into the transition body, * e.g. "line 3: '}' : syntax error". Returns null if `err` is not one. */ export declare function describeGlslError(err: unknown): string[] | null;