import type { CubeLut } from './fx/cube.js';
import type { TransitionSourceOpacity } from './sourceOpacity.js';
export type UniformValue = number | number[];
export interface FxPass {
frag: string;
uniforms?: Record<string, UniformValue>;
inputFrom?: number;
samplers?: Record<string, number>;
lut3d?: CubeLut;
}
export interface GlRuntime {
canvas: HTMLCanvasElement;
render: (
frag: string,
outgoing: TexImageSource,
incoming: TexImageSource,
progress: number,
extra?: Record<string, UniformValue>,
) => void;
renderTransitionWithFx: (
frag: string,
outgoing: TexImageSource,
incoming: TexImageSource,
outgoingPasses: FxPass[],
incomingPasses: FxPass[],
progress: number,
extra?: Record<string, UniformValue>,
sourceOpacity?: TransitionSourceOpacity,
) => void;
renderFx: (
frag: string,
input: TexImageSource,
extra?: Record<string, UniformValue>,
lut3d?: CubeLut,
) => void;
renderFxChain: (passes: FxPass[], input: TexImageSource) => void;
dispose: () => void;
}