Commit Graph

4 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks a517514d37 gfx/blur: Fix type mismatch in OpenGL shaders 2023-04-05 18:51:03 +02:00
Michael Fabian 'Xaymar' Dirks 011bee032a gfx/blur/gaussian: Fix Gaussian Kernel generation
While the previous method worked, it matches no other implementation including a reference implementation. The new implementation almost perfectly matches the reference implementation and uses oversampling to achieve the goal. This has the downside of limiting the blur size to just 64, but it is necessary in order to achieve correct results.

Fixes #573
2023-04-05 18:51:01 +02:00
Michael Fabian 'Xaymar' Dirks 5d4f88e614 gfx/blur: Reduce code duplication with shared file
A lot of the blur effects share quite a bit of code, which can be offloaded into a single include.
2023-04-05 18:51:01 +02:00
Michael Fabian 'Xaymar' Dirks fedc8e075c gfx/blur/gaussian: Refactor Gaussian Blur
Gaussian Blur is another Blur that now supports the new system, increasing the maxium Blur size to 128 and adding support for Rotational and Zoom blur. Various optimizations were done to the actual shader code which further reduced the GPU usage.

Currently the Gaussian curve is recalculated when the blur is first created, which can lead to a short hitch due to it having to search for the correct kernels. This is currently unavoidable and expected behavior until a better solution is found.

Related: #45, #6
2019-04-02 03:50:01 +02:00