Commit graph

142 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
f316e0aa70 nvidia/cuda: Update to match CUDA 11.1 and later
Adds several new functions that may be required for operation
2023-04-05 18:50:52 +02:00
Michael Fabian 'Xaymar' Dirks
3c05d892e6 filter/nvidia-face-tracking: Update to nvidia::cuda::obs 2023-04-05 18:50:52 +02:00
Michael Fabian 'Xaymar' Dirks
18afbdea25 filter/nvidia-face-tracking: Update to new CUDA code 2023-04-05 18:50:52 +02:00
Michael Fabian 'Xaymar' Dirks
f01d2e6db1 filters/sdf-effects: Improve user experience with visual property groups
Grouping properties by what they do improves the user experience as the user does not have to guess at what belongs to which part of the effect. Additionally toggleable groups automatically disable all child elements, so the user is not confused by them still being active.
2023-03-28 13:11:20 +02:00
Michael Fabian 'Xaymar' Dirks
a8c8d3beaa filters/displacement: Permanently deprecate the filter 2023-03-28 13:11:20 +02:00
Michael Fabian 'Xaymar' Dirks
5a65cf3525 plugin: Replace long descriptions with "Open Manual" button
While the long descriptions were useful, keeping the updated and translated is pretty much impossible. Technology moves fast and not everyone that translates the project knows a lot about technology.

Therefore the long descriptions have now been replaced with a button that opens the wiki page for the feature instead. This should drastically reduce the number of help cases, and improve the translation coverage at the same time.
2023-03-28 13:11:20 +02:00
Michael Fabian 'Xaymar' Dirks
21d455b674 filters/color-grading: Add proper suffixes to UI properties 2023-03-28 13:11:19 +02:00
Michael Fabian 'Xaymar' Dirks
b324ed2b28 filters/color-grading: Adjust range for Lift and Gain (#515)
Fixes #515
2023-03-28 13:11:19 +02:00
Michael Fabian 'Xaymar' Dirks
4a3d1d4fa5 filter/shader: Use direct rendering (#501) 2023-03-28 13:11:17 +02:00
Michael Fabian 'Xaymar' Dirks
4e21830627 filter/dynamic-mask: Require buffered rendering 2023-03-28 13:11:17 +02:00
Michael Fabian 'Xaymar' Dirks
ed92e7390a filter/displacement: Require buffered rendering 2023-03-28 13:11:16 +02:00
Michael Fabian 'Xaymar' Dirks
29d60180cc filter/color-grade: Add direct rendering support (#501) 2023-03-28 13:11:16 +02:00
Michael Fabian 'Xaymar' Dirks
4c082ad3a9 filters/color-grade: Fix support for translucent Inputs
Additionally also document some of the code and enforce certain GPU states for rendering.
2023-03-28 13:11:16 +02:00
Michael Fabian 'Xaymar' Dirks
26a76e0451 filters/color-grade: Redesign for use with LUTs
There is hardly any reason for us to recalculate everything all the time. LUTs can cache the work once, and then re-use it every time necessary, drastically reducing the impact of Color Grading by almost 60% (on some GPUs even more). Additionally this fixes the negative gamma issue, which plagued the filter for a while.

In the future, once PR 4199 (https://github.com/obsproject/obs-studio/pull/4199) has been merged, we can cut away one intermediate rendering step currently required to make the effect work. Hopefully this will be with the 27.x release of OBS Studio.
2023-03-28 13:11:11 +02:00
Michael Fabian 'Xaymar' Dirks
3c2fbf2dc4 filter/shader: Initialize with given data
Ignoring the data parameter during initialization results in duplication and some third party plugins not working as expected, so it's better to not ignore it.

Fixes #315
2023-03-28 13:11:06 +02:00
Michael Fabian 'Xaymar' Dirks
79ef573f5b filter/dynamic-mask: Explicitly increase showing/active references
Fixes #384
2023-03-28 13:11:05 +02:00
Michael Fabian 'Xaymar' Dirks
ad33066cd3 filter/blur: Fix unicode support
Related: #359
2023-03-28 13:11:05 +02:00
Michael Fabian 'Xaymar' Dirks
e2d342818a filter/color-grade: Fix unicode support
Related: #359
2023-03-28 13:11:05 +02:00
Michael Fabian 'Xaymar' Dirks
576606c712 filter/displacement: Fix unicode support
Related: #359
2023-03-28 13:11:05 +02:00
Michael Fabian 'Xaymar' Dirks
3da4526795 filter/dynamic-mask: Fix unicode support
Related: #359
2023-03-28 13:11:05 +02:00
Michael Fabian 'Xaymar' Dirks
785ffa0b7d filter/sdf-effects: Fix unicode support
Related: #359
2023-03-28 13:11:05 +02:00
Michael Fabian 'Xaymar' Dirks
63a5873413 project: Remove non-standard std:: prefix from types 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks
dbb9db596e project: Apply formatting 2023-03-28 12:52:21 +02:00
Michael Fabian 'Xaymar' Dirks
dbb71cf801 project: Code cleanup and reapply formatting
Changes applied:

* Moved utility files to /util/.
* Removed unused #includes.
* Removed unused ::ffmpeg::tools function.
* Removed unused variables.
* Fixed missing parentheses in the version macro.
* Fixed missing override on virtual function overrides and removed unnecessary virtual keyword from them.
* Disabled additional warning for ATL headers on MSVC only.
* Replaced direct printf parameters with their macro equivalent.
* Replaced C-style casts with C++-style casts.
* Applied clang-format again after an earlier change to the CMake file broke the integration for it.
2023-03-28 12:52:20 +02:00
Michael Fabian 'Xaymar' Dirks
68a49498e6 common: Rename LOG_ to DLOG_ to avoid macro confusion 2023-03-28 12:52:17 +02:00
Michael Fabian 'Xaymar' Dirks
d9198211f7 gfx/shader: Add Per-Instance/Activation/Frame Random values 2023-03-28 12:52:13 +02:00
Michael Fabian 'Xaymar' Dirks
9562d84221 filters/shader: Fix occasional invisibility problem 2023-03-28 12:52:13 +02:00
Michael Fabian 'Xaymar' Dirks
22e94bb0d8 filters/shader: Don't use scaled size for input capture 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks
ee0a69bbf0 project: Adjust object Ids and add proxies for compatibility 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks
5530d2d416 nvidia/cuda/cuda: Convert to global Singleton 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks
9658c1ee0f nvidia/cuda: Remove 'cu_' prefix from types 2023-03-28 12:52:11 +02:00
Michael Fabian 'Xaymar' Dirks
5fc95b48d8 filters/nv-face-tracking: Improve tracking and remove high priority CUDA stream
The high priority CUDA stream causes libOBS to be at a lower priority than the tracking, which is not what we want. Instead we want tracking to be incomplete in those cases, rather than slowing down encoding and other things.

Geometry updates are also now done once per frame instead of one per tracking update, which should improve the smoothness without affecting performance too much. Additionally all tracking info is now in the 0..1 range, which drastically simplifies some math - especially with texture coordinates.

To deal with tracking and updates being asynchronous, a very simple approximation of movement velocity has been added. This is mostly wrong, but it can bridge the gap where tracking updates are slower, as the values are all filtered anyway.
2023-03-28 12:40:43 +02:00
Michael Fabian 'Xaymar' Dirks
a9bb56c5ee project: Optimize to use single fullscreen tri instead 2023-03-28 12:40:42 +02:00
Michael Fabian 'Xaymar' Dirks
49f1cbc15e project: Improve performance profiling support
Adds a new CMake option "ENABLE_PROFILING" which enables all CPU and GPU performance profiling available in StreamFX for tracking what's actually causing things to be slow.
2023-03-28 12:40:41 +02:00
Michael Fabian 'Xaymar' Dirks
9b13d64551 filter-blur: Add debug markers for performance tracking 2023-03-28 12:40:41 +02:00
Michael Fabian 'Xaymar' Dirks
4947d46aa1 gs-mipmapper: Update API usage, remove broken options and optimize
The new libOBS API allows us to directly access the underlying API instead of having to mess around in memory. By using it we can avoid crashing in case the compiler for it is different, or in case the actual back end structure changes.

Additionally the mostly unimplemented and unused options have also been removed, which streamlines the use of this class even further and reduces both shader and code complexity.

Finally by optimizing the use of the internal render target we can achieve a speed up of up to 3000% over the old way, allowing for many more mipmapped filters.
2023-03-28 12:40:40 +02:00
Michael Fabian 'Xaymar' Dirks
bb21d940bf project: Fix virtual overrides not using the correct type 2023-03-28 12:40:39 +02:00
Michael Fabian 'Xaymar' Dirks
7a929d6af4 locale: Add missing and remove unused strings 2020-04-23 09:14:31 +02:00
Michael Fabian 'Xaymar' Dirks
d0941895ad project: Refactor into namespace streamfx 2020-04-23 00:50:39 +02:00
Michael Fabian 'Xaymar' Dirks
04ac0a640f filter-nv-face-tracking: Improve performance with asynchronous tracking
Through converting the code to a threaded asynchronous approach, the libOBS video renderer no longer has to wait on our tracking code to run, and we can enjoy a little bit of extra calculation time before we actually have to do anything.

However due to the remaining synchronization with the Direct3D11/OpenGL context, it is not entirely safe to spend a full frame tracking as libOBS will then start skipped/dropping frames. Even though the priority of the stream is now increased, this still means that we can't just sit around and have to quickly finish all work.

Related #150
2020-04-17 11:44:37 +02:00
Michael Fabian 'Xaymar' Dirks
908d1f0a20 project: Modernize code to proper C++ 2020-04-09 00:17:25 +02:00
Michael Fabian 'Xaymar' Dirks
05399bd183 filter-dynamic-mask: Add missing include
Fixes #134
2020-04-06 15:39:12 +02:00
Michael Fabian 'Xaymar' Dirks
cd5acd42f4 obs-source-factory: Add settings migration code
Previously sources had to manually implement migration code, which resulted in unresolvable regression issues due to the lack of version and commit tagging. With the new migration code, all sources automatically have this version and commit tagging at all times, and as such can now have a temporary regression fixed without the user needing to change any values manually.
2020-04-05 07:28:10 +02:00
Michael Fabian 'Xaymar' Dirks
a138f95126 cmake: Fix clang support in native OBS Studio build 2020-04-05 06:50:21 +02:00
Michael Fabian 'Xaymar' Dirks
59fa1d36d7 common: Common header include for improved platform support
This header includes all common data between headers used in the plugin. This should improve cross-platform compiling support whenever possible, as all platform-dependent common includes and defines can be done here.
2020-04-02 17:02:01 +02:00
Michael Fabian 'Xaymar' Dirks
30aaea8449 filter-nv-face-tracking: Possibly fix for rare 0x0 bug 2020-04-01 01:41:18 +02:00
Michael Fabian 'Xaymar' Dirks
3dcf4e5dd6 filter-shader: Fix detected sizes 2020-03-31 22:42:18 +02:00
Michael Fabian 'Xaymar' Dirks
ac8844b305 gfx-shader: Add defaults 2020-03-31 22:34:22 +02:00
Michael Fabian 'Xaymar' Dirks
d5dffbbe03 filter-shader: Fix some crashes 2020-03-31 22:26:50 +02:00
Michael Fabian 'Xaymar' Dirks
bb2f43a629 filter-shader: Fix incorrect shader mode 2020-03-31 22:22:55 +02:00