Commit Graph

10 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks a7161b51e0 filter-sdf-effects: Rename Shadow (SDF) Filter (Part 1)
The nature of this Signed Distance Field based Filter is not to only draw shadows, but to also draw an outline or even glow around a source. Therefore the name "Inner/Outer Shadow (SDF)" does not fit well with the intent of the actual Filter.
2019-01-29 04:35:12 +01:00
Michael Fabian 'Xaymar' Dirks 10c0081f32 project: Refactoring Part 2 2019-01-27 23:33:12 +01:00
Michael Fabian 'Xaymar' Dirks d56c0d6f25 project: Refactoring Part 1 2019-01-25 17:55:36 +01:00
Michael Fabian 'Xaymar' Dirks 3ac7e46628 filter-shadow-sdf: Remove shadow_sdf namespace, rename shadow_sdf_instance to shadow_sdf 2019-01-25 00:55:40 +01:00
Michael Fabian 'Xaymar' Dirks 7708dd0792 filter-shadow-sdf: Refactoring, fix and optimize rendering
Fixes the m_source_texture = nullptr bug, which happened due to m_tick and m_last_tick both being 0, as no video_tick is called when the source is first created. Instead a boolean flag is now used that is reset to false on each video_tick.
2019-01-25 00:54:34 +01:00
Michael Fabian 'Xaymar' Dirks a37d9bbb59 filter-shadow-sdf: Actually delete instances in destroy()
This fixes a memory leak discovered by @catb0t.

Related #33
2019-01-25 00:31:50 +01:00
Michael Fabian 'Xaymar' Dirks 5a54a67946 project: Remove unused parameters and fix additional warnings 2019-01-23 02:26:32 +01:00
Michael Fabian 'Xaymar' Dirks e0e2d9fe80 project: Improve Linux support (#27 and #13)
While Linux was not an original goal of the project, it should still be supported out of the box. Therefore a number of changes are contained in this changeset:

- All C++ .h files were renamed to .hpp.
- All C includes (<....h>) were replaced with C++ includes (<c...>) and missing includes were added.
- std::memset and std::memcpy was replaced with memset and memcpy.
- All anonymous structs were removed where necessary.
- `extern "C"` was removed where it wasn't needed.
- #pragma warning was placed behind an #ifdef _MSC_VER
- The macros for `min`, `max` and `clamp` were removed as they were not used.
- `-fpedantic` was added to the GCC flags for bitmask support.
- `gs::rendertarget_op` is now declared before use.
- std::exception(const char*) was replaced with std::runtime_error(const char*).
- Added aligned_alloc and aligned_free macros for GCC and MSVC support.
- Replaced use of `sprintf_s` with `snprintf`.
- Placed additional guards around windows only code.

Additonally some changes were made that do not affect Linux:
- `NOMINMAX` and `NOINOUT` were removed.

Fixes: #27
Fixes: #13
2019-01-14 22:31:35 +01:00
Michael Fabian 'Xaymar' Dirks ca1e26fd20 filter-shadow-sdf: Fix crash when adding source
I'm not sure how this one passed by me. Or how this worked, as I have screenshots and videos of it working before applying this fix.
2018-12-23 23:48:08 +01:00
Michael Fabian 'Xaymar' Dirks 0c92f3dbf5 filter-shadow-sdf: Inner/Outer shadow based on signed distance fields
Adds Inner/Outer Shadows for dynamic sources based on signed distance field generation. This is fast, but does add a bit of latency when it comes to updates - which means that moving objects will leave a trail before the generator has a chance to update.

Fixes #3
2018-11-08 13:52:43 +01:00