Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/neiltron/blur-canvas

Basic framebuffer blur utility
https://github.com/neiltron/blur-canvas

Last synced: 14 days ago
JSON representation

Basic framebuffer blur utility

Awesome Lists containing this project

README

        

# blur-canvas
Basic framebuffer blur utility. Pass in a texture, get a blurred framebuffer back. Useful for one-off, static blurs but can also be used in a render loop.

Uses [glsl-fast-gaussian-blur](https://github.com/Jam3/glsl-fast-gaussian-blur) by jam3.

## Usage
```
// setup with options. make sure to pass in a shared renderer.
const blurCanvas = new BlurCanvas({ width, height, renderer });

// blur a texture
blurCanvas.blur(renderTarget.texture);

// use the result
mesh.material.uniforms.textureSmall.value = blurCanvas.getCurrentTexture();
```

## Roadmap
Some potential next steps:
- [ ] Decouple from threejs
- [ ] Add offscreen canvas example
- [ ] jsdoc and better comments