Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/neiltron/blur-canvas
- Owner: neiltron
- License: mit
- Created: 2021-09-13T13:43:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-13T13:55:33.000Z (about 3 years ago)
- Last Synced: 2024-10-19T00:19:38.129Z (27 days ago)
- Language: JavaScript
- Size: 45.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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