Commit Graph

1745 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks eef9f0697d gfx-effect-source: Fix various warnings 2018-11-07 14:44:07 +01:00
Michael Fabian 'Xaymar' Dirks 55abc87126 plugin: extern "C" around obs includes 2018-11-07 14:44:07 +01:00
Michael Fabian 'Xaymar' Dirks f54efe7704 gfx-source-texture: Support for new obs-source managed class
This also adds support for proper source management in unmanaged cases.
2018-11-07 14:44:06 +01:00
Michael Fabian 'Xaymar' Dirks 58661bf3ac cmake: Add obs-source and obs-tools source 2018-11-07 14:44:06 +01:00
Michael Fabian 'Xaymar' Dirks 234cbf5dab obs-tools: Various obs related tools 2018-11-07 14:44:06 +01:00
Michael Fabian 'Xaymar' Dirks 9c0761adde obs-source: Managed class for obs_source_t 2018-11-07 14:44:06 +01:00
Michael Fabian Dirks 37ad918881 Add Issue Templates
Add issue templates to aid in categorizing and resolving issues.
2018-10-05 20:40:52 +02:00
Michael Fabian 'Xaymar' Dirks daad792eda filter-blur: Add support for scene as mask input (#14)
Adds full support for Scenes as mask input so that you can re-use your overlay scene as a blur input and have the blur follow behind your overlay.

Closes #14
2018-10-01 01:03:48 +02:00
Michael Fabian 'Xaymar' Dirks 382a217f06 filter-blur: Add support for image and source masks (#14) 2018-10-01 01:00:00 +02:00
Michael Fabian 'Xaymar' Dirks ebbc0cb1ce filter-blur: Fix Mask Type and split Color into Color and Alpha 2018-10-01 00:57:22 +02:00
Michael Fabian 'Xaymar' Dirks 999df5e6e5 gfx-source-texture: Refactoring 2018-10-01 00:54:18 +02:00
Michael Fabian 'Xaymar' Dirks d56f4f9eac filter-blur: Add proper mask options
* Removes the old 'Region' fields and places them under a 'Mask' option that can do much more.
* Supported Mask types: Region, Image, Source.
* Image and Source mask types allow for a color filter and multiplier.
2018-09-30 22:48:47 +02:00
Michael Fabian 'Xaymar' Dirks a2a30b5fe1 effects: Add masking lerp effect
* Supports region, feathered region, inverted region, inverted feathered region and image input.
* Interpolates between image_blur and image_orig depending on the result of the mask function.
2018-09-30 22:47:37 +02:00
Michael Fabian 'Xaymar' Dirks cfaa7eb1b9 strings: Add translated File Filters for Images 2018-09-30 21:55:13 +02:00
Michael Fabian 'Xaymar' Dirks f327f4ccc6 util-math: Undefine macro 2018-09-30 21:44:00 +02:00
Michael Fabian 'Xaymar' Dirks 3135214a03 filter-blur: Refactor and formatting
* Now using a Factory and Instance approach to simplify and beautify the code at the same time.
* Additionally we now keep track of created filters and only load data if there is a filter active, and unload data if there are no more filters. This reduces memory and GPU overhead when no filter is active, but adds a first time filter creation overhead.
* Variables and functions now use snake_case.
2018-09-30 20:50:00 +02:00
Michael Fabian 'Xaymar' Dirks 354445bc81 strings: Remove plugin:: namespace 2018-09-30 20:18:13 +02:00
Michael Fabian 'Xaymar' Dirks 8296af68c6 project: Rename 'Filter' to 'filter' 2018-09-30 18:49:52 +02:00
Michael Fabian 'Xaymar' Dirks da22e72da7 filter-transform: Fix mipmapping for npot input
The filter will now automatically rescale the parent stack into the next best power of two size. With this, even non-power-of-two sources can now be mipmapped semi-correctly.

To accurately support mipmapping even for npot textures, this feature would have to be built into OBS and OBS would have to stop refusing to create textures with mipmaps that are not a power of two in size. Almost all common Direct3D 11 (except Intel) are capable of npot mipmaps at full speed, while OpenGL usually depends on the GPU and Driver used.
2018-09-29 17:05:58 +02:00
Michael Fabian 'Xaymar' Dirks 6561ea9b3c util-math: Rename get_power_of_two to get_power_of_two_exponent 2018-09-29 16:57:41 +02:00
Michael Fabian 'Xaymar' Dirks 9a8a44045b gs-mipmapper: Fix support for very small mipmaps
This fixes the final mip map of a texture being empty, in cases where either width or height is reduced to just a single pixel.
2018-09-29 16:57:17 +02:00
Michael Fabian 'Xaymar' Dirks 38b6ec7c65 gs-mipmapper: Fix Sharpen shader, add strength support for Smoothen 2018-09-29 15:58:13 +02:00
Michael Fabian 'Xaymar' Dirks 0a7283b2ba filter-transform: more Formatting, add mipmap options 2018-09-29 15:57:25 +02:00
Michael Fabian 'Xaymar' Dirks dbe577e372 filter-transform: Formatting, refactoring and mipmapping
The '3D Transform' filter now support mipmapping using the Linear generator. This results in smoother images when the shape is squished or distant, instead of a pixelated mess.
2018-09-29 01:07:38 +02:00
Michael Fabian 'Xaymar' Dirks 7c520ae9ee gs-mipmapper: Implement actual mipmap generation
This enables full mipmapping support for textures with a shader view that allows accessing different mip levels. In order to access mip levels, you have to specify gs::texture:🎏:BuildMipMaps when creating the texture, as OBS currently forces the maximum mip level to 1 even if you actually have mip data available.
2018-09-29 01:06:30 +02:00
Michael Fabian 'Xaymar' Dirks c591902fea gs-texture: Allow texture creation without data
This is a valid operation and allows for creation of uninitialized textures, which can be copied to but should not be read from until that moment.
2018-09-28 23:34:43 +02:00
Michael Fabian 'Xaymar' Dirks 95018868dc gs-mipmapper: Formatting and refactoring 2018-09-28 23:32:35 +02:00
Michael Fabian 'Xaymar' Dirks bb5c1f80b5 gfx-source-texture: Formatting and refactoring 2018-09-28 23:31:21 +02:00
Michael Fabian 'Xaymar' Dirks bc89eaf33a util-math: Fix is_power_of_two_loop for non-64-bit types 2018-09-28 21:21:40 +02:00
Michael Fabian 'Xaymar' Dirks 6e03f2334d gs-mipmapper: Textures with no mip level do not exist 2018-09-28 21:21:24 +02:00
Michael Fabian 'Xaymar' Dirks f78be9c387 gs-texture: Undo removal of mip_data check 2018-09-28 21:21:04 +02:00
Michael Fabian 'Xaymar' Dirks 04d7379ff1 filter-transform: Formatting 2018-09-28 14:49:59 +02:00
Michael Fabian 'Xaymar' Dirks b5746e473b gfx-effect-source: Remove mipmapper 2018-09-28 14:26:06 +02:00
Michael Fabian 'Xaymar' Dirks 3f3cbb8939 gs-mipmapper: Add mip level and remove bilinear from effect 2018-09-28 14:25:04 +02:00
Michael Fabian 'Xaymar' Dirks ff8618c339 gs-mipmapper: Specify source and target and remove Bilinear 2018-09-28 14:24:30 +02:00
Michael Fabian 'Xaymar' Dirks afc04a5d0e gs-texture: Use util::math functions 2018-09-28 14:23:47 +02:00
Michael Fabian 'Xaymar' Dirks 528d36a13f util-math: Fix compile error and add get_power_of_two_* 2018-09-28 14:23:26 +02:00
Michael Fabian 'Xaymar' Dirks 391fca7497 gs-effect: Formatting 2018-09-28 14:18:09 +02:00
Michael Fabian 'Xaymar' Dirks 1923a724d7 util-math: Formatting and is_power_of_two templates 2018-09-28 14:17:43 +02:00
Michael Fabian 'Xaymar' Dirks db13c50ec5 gfx-effect-source: Add initial code for texture support 2018-09-28 11:55:55 +02:00
Michael Fabian 'Xaymar' Dirks e0f1de8c4b gs-mipmapper: Fix mipgen effect file 2018-09-28 11:48:06 +02:00
Michael Fabian 'Xaymar' Dirks 7b995cf50b gs-vertexbuffer: Fix heap corruption 2018-09-28 11:47:50 +02:00
Michael Fabian 'Xaymar' Dirks 72d15bad31 gs-mipmapper: Slight formatting changes 2018-09-27 06:21:39 +02:00
Michael Fabian 'Xaymar' Dirks bc63696306 gs-mipmapper: Early attempts at proper mipmap rendering
This class is an attempt at adding dynamic mipmapping support to OBS, which is lacking this feature. It is pretty much a hack until I figure out how to do it for both d3d11 and opengl and can make a PR for obs-studio to include this ability by default.
2018-09-27 06:09:43 +02:00
Michael Fabian 'Xaymar' Dirks 14b370a7a5 gs-texture: Remove accidentally added enum 2018-09-27 05:36:49 +02:00
Michael Fabian 'Xaymar' Dirks fb77cc90a6 gs-rendertarget: Allow retrieving color and zstencil format 2018-09-27 05:23:14 +02:00
Michael Fabian 'Xaymar' Dirks faeb5af45b gs-rendertarget: Formatting and refactoring 2018-09-27 05:17:08 +02:00
Michael Fabian 'Xaymar' Dirks ded5896fca gs-texture: Add get_color_format method 2018-09-27 05:11:37 +02:00
Michael Fabian 'Xaymar' Dirks 52cb7a6d20 gs-texture: Formatting, refactoring and cleanup 2018-09-27 05:09:38 +02:00
Michael Fabian 'Xaymar' Dirks 4c1e66e27b gs-vertexbuffer: Remove #pragma region 2018-09-27 03:11:04 +02:00