import { motionBlurPixels } from "../../PostProcessPass.js";
import { applyThreeCompatPixelKernel, createThreeCompatVelocityProxy } from "./PostProcessTypes.js";
export class MotionBlurPassThreeCompat {
    blur;
    name = "MotionBlurPass";
    enabled = true;
    constructor(blur = 0.18) {
        this.blur = blur;
    }
    apply(frame) {
        return applyThreeCompatPixelKernel({ ...frame, blur: frame.blur + this.blur }, this.name, (pixels, width, height) => motionBlurPixels(pixels, width, height, {
            velocity: frame.velocity ?? createThreeCompatVelocityProxy(width, height),
            samples: 5,
            scale: Math.max(0.1, this.blur * 4)
        }).pixels, "motionBlurPixels kernel");
    }
}
//# sourceMappingURL=MotionBlurPass.js.map