Commit Graph

15 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks af71a7cc1d filter-blur: Allow applying Blur to a sub-region of the source only
The Blur Filter can now be applied to a region inside the source itself, the inverse of that region, and/or a feathered version of that region. This allows for easier scene setups where only some parts need to be blurred, but the rest can be left as is.

Fixes #12
2018-04-29 00:14:29 +02:00
Michael Fabian 'Xaymar' Dirks 1ba9145fbd filter-blur: Use only a single Gaussian Kernel Texture 2018-04-28 14:41:18 +02:00
Michael Fabian 'Xaymar' Dirks 6c1e874369 filter-blur: Refactoring, formatting and copyright 2018-04-28 13:59:54 +02:00
Michael Fabian 'Xaymar' Dirks 2adfa5765c gs: Rename to snake_case instead of PascalCase
This should prevent mishaps with upper/lowercase typos and fits in better with the C++ standard code, which is also in snake_case.
2018-03-20 12:44:02 +01:00
Michael Fabian 'Xaymar' Dirks e7bbb213a4 filter-blur: Fix Blur filter occasionally not rendering
An earlier commit changed how Blur filter rendered and thus m_technique was no longer being initialized, resulting in the check randomly failing if the memory was just right.

This also adds some more extra logging to the instance creation in case things fail and fixed one MSVC warning.

Fixes #1
2017-12-14 03:52:29 +01:00
Michael Fabian 'Xaymar' Dirks 911f7696bb filter-blur: Reduce log spam on error 2017-12-14 02:35:47 +01:00
Michael Fabian 'Xaymar' Dirks 578c963a02 filter-blur: Code cleanup, fixes and more
- Fixed Gaussian Blur having color issues with radii that aren't a power of 2.
- Improved error reporting to better debug problems where Blur doesn't render.
- Switched from manual object management to managed classes.
- Lots of code cleanup for maintainability.
2017-12-14 01:39:33 +01:00
Michael Fabian 'Xaymar' Dirks 61f20a83ad filter-blur: Use self-registration feature 2017-12-14 00:24:37 +01:00
Michael Fabian Dirks e619f03217 filter-blur: Remove unused and duplicate functions 2017-09-18 00:05:40 +02:00
Michael Fabian Dirks 4dbf414214 effects, filter-blur: Precalculated Kernel, Formatting, Rendering and more
Filter:
* Massively improved Rendering loop to reduce overhead and provide cleaner code.

Gaussian Blur:
* Added precalculated Kernels using Textures. Slightly reduced GPU load.
* Added basic attempt at a Nvidia o(n/2+1) gaussian blur implementation.
* Fix up LOD for texture sampling.

Box Blur:
* Halved loop count.
2017-08-20 00:25:05 +02:00
Michael Fabian Dirks 52c3a0171e filter-blur: Initial work on optimization 2017-07-18 16:50:30 +02:00
Michael Fabian Dirks 9967a6ebf0 filter-blur: Add Color Format option
This option allows applying the blur to other color formats such as YUV. Bilateral Blur benefits the most from this, resulting in smoother images at lower kernel sizes.
2017-07-06 06:02:41 +02:00
Michael Fabian Dirks 9c97d90cc2 filter-blur: Split off blur rendering into method 2017-07-06 05:57:57 +02:00
Michael Fabian Dirks 2621d4961f filter-blur: Multiple changes, see description
* Added a 'Bilateral' de-noising blur, currently very resource hungry. It also has two extra sliders called 'Smoothing' and 'Sharpness', the former controls how smooth the output is
* Updated effect loading to be global instead of per instance.
* Changed default blur size to 5px.
* Simplified render loop (see previous effect commit).
2017-07-03 07:20:15 +02:00
Michael Fabian Dirks 5cdbb127c7 filter-blur: Add Box and Gaussian Blur Filter
This is not very optimized at the moment and will take quite a bit of GPU time. Will have to spend some time later to optimize it and perhaps add directional blur ("Motion Blur" to it).
2017-07-03 02:46:45 +02:00