Commit Graph

86 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks 1482cb1d11 cmake: Add clang-format support
This does not rely on the "integrated" clang-format, but instead uses a custom target to achieve the goal. Supports file filtering (to ensure that clang-format only affects supported files), automatic dependency by the project (always run before build), multiple targets and a global target.

Options are:
- TARGETS <target> ...: Targets to add clang-format support to.
- DEPENDENCY: Add a dependency to the given targets so that clang-format runs before building.
- REGEX: Filter out files of the given targets, defaults to '\.(h|hpp|c|cpp)'.
- GLOBAL: Add a global CLANG_FORMAT target.
2019-12-21 17:05:53 +01:00
Michael Fabian 'Xaymar' Dirks e6220b18f6 project: Temporarily disable Custom Shader filters 2019-12-18 06:39:07 +01:00
Michael Fabian 'Xaymar' Dirks 50ac6893bf gs-effect-parameter: Refactor effect_parameter onto std::shared_ptr
Prevents problems further down the line and supports multiple types of parents to ensure that lifetime is guaranteed.
2019-12-15 10:35:29 +01:00
Michael Fabian 'Xaymar' Dirks 0ad896e905 gfx-shader: Rename from gfx-effect-source 2019-12-15 09:09:11 +01:00
Michael Fabian 'Xaymar' Dirks 738b08de36 gs-effect-pass/technique: Implement wrapper code based on std::shared_ptr
These two wrap the underlying gs_epass and gs_effect_technique objects, to allow direct and improved access to them without relying on the libobs API to provide this access for us. Additionally these make it safe for us to use them instead of relying on C-like code to deal with it.
2019-12-15 09:05:23 +01:00
Michael Fabian 'Xaymar' Dirks 0b14b65ba8 cmake: Add deprecation warning to 32-bit builds 2019-12-03 17:45:37 +01:00
Michael Fabian 'Xaymar' Dirks aa170c7c54 data: Move example data into examples/ 2019-11-18 03:03:11 +01:00
Michael Fabian 'Xaymar' Dirks d47ab0570f obs-source-factory: Barebone Source Factory and Instance
This class and template should be used to reduce the code clutter from repeatedly doing the same thing. It requires OBS v24.0 or newer since the get_properties2 and get_defaults2 API were fully implemented with it.
2019-10-18 22:31:52 +02:00
Michael Fabian 'Xaymar' Dirks 5e50d64b8f cmake: Disable Spectre warnings 2019-10-13 06:16:46 +02:00
Michael Fabian 'Xaymar' Dirks 2ba8e9a994 cmake: Reformat 2019-10-13 05:42:54 +02:00
Michael Fabian 'Xaymar' Dirks 66cc3c9926 cmake: Don't warn about not explicitly handled cases in MSVC 2019-09-05 18:10:22 +02:00
Michael Fabian 'Xaymar' Dirks 4ab609015c cmake: Ignore more noise warnings in MSVC 2019-09-04 20:31:18 +02:00
Michael Fabian 'Xaymar' Dirks 5b5a2cd409 cmake: Don't override diagnostics mode in MSVC
This breaks MSVC somehow.
2019-09-04 04:02:58 +02:00
Michael Fabian 'Xaymar' Dirks c6f75930af cmake: Disable even more MSVC warnings 2019-09-04 03:55:15 +02:00
Michael Fabian 'Xaymar' Dirks 56ee81e2a4 cmake: Disable additional MSVC warnings 2019-09-04 03:47:53 +02:00
Michael Fabian 'Xaymar' Dirks b3eaa6c43e cmake: Disable warning 4201 and 4514 in MSVC 2019-09-04 03:43:43 +02:00
Michael Fabian 'Xaymar' Dirks b63796d3ae cmake: Revert previous commit 2019-09-04 03:32:18 +02:00
Michael Fabian 'Xaymar' Dirks d9e2fbe5c1 cmake: Set Warnings and standard before project call 2019-09-04 03:23:00 +02:00
Michael Fabian 'Xaymar' Dirks 2b35328fcb project: Support for OBS v24.0.0-rc2 2019-09-03 21:26:10 +02:00
Michael Fabian 'Xaymar' Dirks 8beaf49d10 cmake: Update libobs to 24.0.0-rc1 2019-08-24 06:47:03 +02:00
Michael Fabian 'Xaymar' Dirks 8cb2ddaa82 source-shader, cmake: 'Shader' source 2019-08-07 18:06:48 +02:00
Michael Fabian 'Xaymar' Dirks 6bf99ed52b cmake: Enable extended aligned storage to fix SSE/AVX compatibility 2019-08-07 12:42:01 +02:00
Michael Fabian 'Xaymar' Dirks d0b39186ea cmake: Fix upgraded URL 2019-08-02 23:58:00 +02:00
Michael Fabian 'Xaymar' Dirks 3f4a07ebb2 cmake: Upgrade default libobs version 2019-08-02 23:55:03 +02:00
Michael Fabian 'Xaymar' Dirks 721f2bdf8f filter-color-grade: Fully feature Color Grading filter
Allows controlling Lift, Gamma, Gain, Offset, Tint and various Correction factors directly from within OBS without having to create a new LUT.
2019-08-02 23:49:18 +02:00
Michael Fabian 'Xaymar' Dirks 013861694a project: Version 0.7.0 2019-04-27 17:56:11 +02:00
Michael Fabian 'Xaymar' Dirks 9e7894c9c3 filter-dynamic-mask: Implement Dynamic Mask filter
This filter allows the use of another source as a mask, allowing complex filter graphs and trippy effects, such as creating a text source with three animated videos, each using a different color channel as the mask.

Fixes #18.
2019-04-27 17:56:10 +02:00
Michael Fabian 'Xaymar' Dirks 088edf1045 cmake: Update copyright years 2019-04-23 17:58:36 +02:00
Michael Fabian 'Xaymar' Dirks aac52f736d project: Clang support
Lots and lots of errors and warnings fixed with this single commit, in the name of clang support.

Related #60, #47.
2019-04-19 09:42:15 +02:00
Michael Fabian 'Xaymar' Dirks 411f5ee900 cmake: Remove CppCheck support
The current way was a hack at best, and there is a much better way using CMAKE_EXPORT_COMPILE_COMMANDS=ON. For more, read the CppCheck manual.
2019-04-19 08:20:33 +02:00
Michael Fabian 'Xaymar' Dirks 3800584c2d cmake: Set expected C++ standard to C++17 2019-04-19 08:20:33 +02:00
Michael Fabian 'Xaymar' Dirks c59ec2511b filter-sdf-effects: Refactor to include Glow and Stroke (#2, #4)
This refactors the SDF Effects to use a normal blend function instead of doing the blend in the effect itself, improving quality and reducing problematic sampling issues. In addition to this, the effect files have been cleaned up slightly and renamed to their proper names. Glow and Stroke are now supported, which solves both #2 and #4 in one go.

The caching optimization has also now been implemented, reducing the number of renders for this filter to 1 for each tick.
2019-04-14 14:19:59 +02:00
Michael Fabian 'Xaymar' Dirks da66947e10 project: Version 0.6.1 2019-04-03 06:45:10 +02:00
Michael Fabian 'Xaymar' Dirks af023f9132 project: Version 0.6.0 2019-04-03 02:59:48 +02:00
Michael Fabian 'Xaymar' Dirks ddf75d3e9f obs-audio-capture: Remove unused code 2019-04-02 19:45:10 +02:00
Michael Fabian 'Xaymar' Dirks 8e9e39a88e project: Remove unused content 2019-04-02 04:37:37 +02:00
Michael Fabian 'Xaymar' Dirks 8a1579f702 cmake: Add refactored and new blur code 2019-04-02 03:50:01 +02:00
Michael Fabian 'Xaymar' Dirks 850318dc6e project: Version 0.5.0 2019-03-01 20:46:13 +01:00
Michael Fabian 'Xaymar' Dirks cbe3555223 cmake: Add template files to project 2019-02-11 06:27:36 +01:00
Michael Fabian 'Xaymar' Dirks da5d30c43b cmake: Fix OBS Studio typo 2019-02-11 04:03:57 +01:00
Michael Fabian 'Xaymar' Dirks 3bf1333c84 project: Restructure of the file system
The number of files in the source directory was a little bit much and just made file naming more complex than it had to be. Therefore all files were moved into subdirectories where it matters.

Filters now reside in source/filters/, Sources in source/sources/, OBS Wrappers in obs/, OBS GS Wrappers in obs/gs/, Transitions will reside in source/transitions, Graphics Helpers will be in gfx/.
2019-02-11 04:03:57 +01:00
Michael Fabian 'Xaymar' Dirks a49e8c6f9d cmake: Don't generate InnoSetup files for non-Windows platforms 2019-02-02 06:33:49 +01:00
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 551cbb83b1 obs-source-tracker: Source Tracking Compatibility Layer
Allows for enumerating any kind of source, as long as it has a name and is not private. As obs_enum_scenes is a 23.x and above function, this class should be used instead to remain backwards compatible.
2019-01-27 22:43:49 +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
Cat Stevens 3b1551b8ef cmake: Fix "FindLibobs.cmake" capitalisation
Fix "FindLibobs.cmake" filename case for case-sensitive filesystems
2019-01-14 22:20:56 +01:00
Michael Fabian 'Xaymar' Dirks 95fdcff3a9 cmake: Reworked build system for Installers and Archives 2018-12-23 21:15:05 +01:00
Michael Fabian 'Xaymar' Dirks 93df9b50b8 filter-blur: Add Linear Box Blur and combine all effects
Linear Box Blur abuses the fact that with Linear Sampling we can sample up to four adjacent texels at the same time and get a correct result for Box Blur back. Using this the total number of sample for Box Blur is reduced by n, making the total either n+1 (Even Radius) or n (Odd Radius).

Additionally all blur effect files have been merged into a single blur.effect file to reduce the time required to change a single parameter name. New blur effects should be added as a new technique instead of as a new effect file.

See Also: #21 Blur Quality
2018-12-22 22:08:55 +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
Michael Fabian 'Xaymar' Dirks 79daeb5a75 util-event: Template event handler class 2018-11-08 08:07:49 +01:00