Skip to content

experimenting with different blur algorithms in webgl

License

Notifications You must be signed in to change notification settings

MaksymPylypenko/Blur

Repository files navigation

Blur

Real time gaussian blur in webgl. Try

Image

Optimizations

Vertical blur --> Horizontal blur

  • doing vertical and horizontal blurs in a sequence is equivalent to a regular blur.
  • texture lookups (for each fragment) are reduced from 9x9 to 9*2.
  • no loss of quality.

Multiple rounds

  • alternative to increasing the kernel size.
  • 2 rounds of 9x9 is equivalent to a 36x36 gaussian blur.
  • adds flexibility

Downscaling

  • less pixels --> dramatic increase in performance --> can do more rounds
  • has small overhead.
  • may result in visual artifacts, especially when there is lots of movement.

Linear sampling

  • approximating a larger kernel (e.g 8x8 --> 17x17) by using bilinear filtering.
  • some work is delegated to the hardware.

Resources used:

About

experimenting with different blur algorithms in webgl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published