gaussian-blur
v0.0.3
Published
optimized 9-tap gaussian blur for GLSL
Downloads
21
Maintainers
Readme
gaussian-blur
Optimized separable gaussian blurs for GLSL. This is adapted from Efficient Gaussian Blur with Linear Sampling.
Installation
npm install gaussian-blur
Usage
import Blur from 'gaussian-blur';
const img = new Image();
img.src = imgSrc;
const canvas = document.querySelector("canvas");
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const blur = new Blur(canvas, img);
blur.draw(2);
Running examples
git clone https://github.com/amilajack/gaussian-blur
cd gaussian-blur
yarn
# Run the example
yarn start
# Build the lib
yarn build
Related
- https://github.com/flozz/StackBlur
- https://github.com/pcwalton/fast-gaussian
- https://github.com/Jam3/glsl-fast-gaussian-blur