Commit graph

84 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
ccc4c6ea22 filter-sdf-effects: Fix and improve effect rendering
Fixes the bug that rendering an outline would remove all other effects not directly under the outline, while also improving the rendering speed drastically by only initializing and clearing the rendertarget once instead of for each effect.
2019-05-28 02:51:27 +02:00
Vainock
0e39490284 locale: Delete unused language files (#67) 2019-04-28 18:20:56 +02:00
Vainock
438ce1abf9 locale: Fix mistake in locale (#66) 2019-04-28 17:56:31 +02:00
Michael Fabian Dirks
956df8762c locale: New Crowdin translations (#63) 2019-04-27 17:59:31 +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
Vainock
b4341e41b3 locale: Add missing dot at the end of a line (#62) 2019-04-23 12:42:27 +02:00
Michael Fabian Dirks
61d5a0341a
locale: New Crowdin translations (#59) 2019-04-21 20:30:59 +02:00
Michael Fabian 'Xaymar' Dirks
3aa663908a locale: Further improve original translations 2019-04-19 08:20:33 +02:00
Michael Fabian Dirks
870625e8e5
locale: Update translations from CrowdIn (#58) 2019-04-15 12:56:21 +02:00
Michael Fabian 'Xaymar' Dirks
e24b9a61fa filter-blur: Update long description of Type and Subtype fields
Automatically updates the long description (hover text) if the Type or Subtype field is changed, allowing for more contextual information about what the selected information does.
2019-04-15 12:54:19 +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 Dirks
982dbc655b
locale: Update translations from CrowdIn (#55) 2019-04-14 13:59:02 +02:00
Michael Fabian Dirks
74f9bc0dbf
locale: Update translations from CrowdIn (#53) 2019-04-02 22:43:37 +02:00
Michael Fabian 'Xaymar' Dirks
8e9e39a88e project: Remove unused content 2019-04-02 04:37:37 +02:00
Michael Fabian 'Xaymar' Dirks
21eef998ec filter-blur: Refactor to use new Blur code
This removes the ridiculous amount of hardcoded values and functions and moves everything to the more modular blur approach.

Fixes #45
Fixes #6
2019-04-02 03:50:01 +02:00
Michael Fabian 'Xaymar' Dirks
7c4d46c1fe gfx/blur/dual-filtering: Implement Dual Filtering Blur
Dual Filtering (or Dual Kawase) is an approximation of Gaussian Blur that can reach much higher Blur sizes at a much lower cost. However it is locked to a 2^n size, which means that currently it isn't possible to use it for blur sizes like 19, 24 and 31.

The Blur works by using the linear sampling of a GPU, combined with down- and upsampling and carefully placed sampling points. This means that there is no need for a linear optimized version of this Blur.

Related: #45, #6
2019-04-02 03:50:01 +02:00
Michael Fabian 'Xaymar' Dirks
b6d45ce73c gfx/blur/gaussian-linear: Refactor Linear Gaussian Blur
While Gaussian Blur is not a Blur type that really benefits much from linear sampling, it can be used for a slight quality and gpu usage reduction. However for Area and Directional Blur there is a better alternative: Dual Filtering Blur. And as with all other currently implement Linear versions of Blur, only Area and Directional Blur are supported.

This type of Gaussian Blur also has the loading hitch that exists in normal Gaussian Blur.

Related: #45, #6
2019-04-02 03:50:01 +02:00
Michael Fabian 'Xaymar' Dirks
fedc8e075c gfx/blur/gaussian: Refactor Gaussian Blur
Gaussian Blur is another Blur that now supports the new system, increasing the maxium Blur size to 128 and adding support for Rotational and Zoom blur. Various optimizations were done to the actual shader code which further reduced the GPU usage.

Currently the Gaussian curve is recalculated when the blur is first created, which can lead to a short hitch due to it having to search for the correct kernels. This is currently unavoidable and expected behavior until a better solution is found.

Related: #45, #6
2019-04-02 03:50:01 +02:00
Michael Fabian 'Xaymar' Dirks
68a8fb9224 gfx/blur/box-linear: Refactor Linear Box Blur
Box Blur is a prime candidate for Linear optimizations, and as such reducing the total necessary samples by about half. However due to the reduction in samples, only Area and Directional Blur are supported.

Related: #45, #6
2019-04-02 03:50:01 +02:00
Michael Fabian 'Xaymar' Dirks
8c5dc3c630 gfx/blur/box: Refactor Box Blur
Box Blur is the first to be on the new system and has received all the new features and optimizations available. The maximum Blur size has been increased to 128, Rotational and Zoom Blur are supported and a small optimization has been done to the shader.

Related: #45, #6
2019-04-02 03:50:01 +02:00
Michael Fabian Dirks
1bcca6cb33
locale: Update translations from CrowdIn (#50) 2019-04-02 03:49:42 +02:00
Michael Fabian Dirks
e5cfc2c70d
locale: New Crowdin translations (#49)
Updated translations for german and french.
2019-03-06 03:09:22 +01:00
Michael Fabian Dirks
516d324187
locale: Update translations from CrowdIn (#43) 2019-02-22 20:38:15 +01:00
Michael Fabian Dirks
48b76d2ba6
locale: Update translations from CrowdIn 2019-01-31 05:23:32 +01:00
Michael Fabian 'Xaymar' Dirks
50f05e72ae filter-displacement: Improve displacement quality
Earlier versions tried using Trilinear as the Filter, but the correct name is Linear. With this the sampling is now set to be Linear instead of undetermined.

Additionally the logic for the displacement was adjusted and now no longer renders incorrectly when going from texel to texel. This was due to the unstable math being performed to retrieve the sign of the number, but the sign() command can do it without this math being required.
2019-01-31 04:47:38 +01:00
Michael Fabian 'Xaymar' Dirks
9b4edc8fb0 filter-sdf-effects: Improve shadow rendering
This works around the incorrect shadow on the edge of the Signed Distance Field, but it does not get rid of it completely. Due to linear sampling it will still show at some point so a different solution has to be found in the future.
2019-01-31 02:25:09 +01:00
Michael Fabian 'Xaymar' Dirks
ecd17cff6c filter-sdf-effects: Fix colored shadows changing image
Colored shadows previously had an effect on the image color, but this is incorrect if the image is fully opaque. This fixes it by using premultiplied alpha mixing instead.
2019-01-30 03:37:46 +01:00
Michael Fabian 'Xaymar' Dirks
75009c617a filter-sdf-effects: Support for scaling SDF Texture Size
This allows increasing or decreasing the accuracy of the Signed Distance Field at runtime without requiring the initial source to be resized. Use case for this would be small text where the higher quality would only be noticable on the shadow and not the text itself.
2019-01-30 03:12:12 +01:00
Michael Fabian 'Xaymar' Dirks
7cf3e17b9b filter-sdf-effects: Fix black border and add inverse gradient shadow
Sources were rendering with a black border around them if they had a soft fade, which is due to how the shadow calculated the image sample. With the new shader code this is now fixed and the source looks like it should be. Additionally this removes the bug where enabling any shadow would cause only the texels to draw that were above the threshold.

Additionally this adds support for inverse gradients (min > max) and negative gradients for outer shadows instead of only positive gradients. This technically allows for cleaner shadows.
2019-01-30 02:38:34 +01:00
Michael Fabian 'Xaymar' Dirks
a699016c61 locale: Update Translated name for SDFEffects 2019-01-29 07:39:01 +01:00
Michael Fabian 'Xaymar' Dirks
3ebbc84ee2 filter-sdf-effects: Rename Shadow (SDF) Filter (Part 2)
This finalizes the rename started in the previous commit by changing the class name and also updating the locale strings
2019-01-29 07:35:14 +01:00
Michael Fabian 'Xaymar' Dirks
160ad3b5a9 locale: Replace file filters with file types
The filters are always the same for every language and should not be translated, instead only the file type should be translated. This way bad translations will not affect the options that the user can select.
2019-01-24 20:34:28 +01:00
Michael Fabian Dirks
fc21e9698e
locale: Update translations from CrowdIn
Closes #38
2019-01-24 17:41:18 +01:00
Michael Fabian 'Xaymar' Dirks
cc99916d18 locale: Replace Strength with Intensity for MipGenerator 2019-01-24 14:26:31 +01:00
Michael Fabian 'Xaymar' Dirks
9d55013ec2 source-mirror: Improve rendering and add new rescaling options
Rendering will now use a cached version of the mirrored source in order to reduce rendering cost drastically for heavy sources or scenes. Additionally rescaling now uses the internal scene instead of being a custom implementation, allowing for some new things.

Rescaling now has a new option: Bounds Type! This option allows control over just how a source is scaled, by default it is set to Stretch, but there are other options that can keep the aspect ratio of the mirrored source in tact.

Additionally the ScalingMethod struct has been replaced with obs_scale_type, which means that Bilinear Low Resolution is now no longer an option.

Implements #35
2019-01-24 04:28:11 +01:00
wwj402
5492f76fd0 locale: Update chinese simplified language (#26) 2019-01-14 22:40:55 +01:00
Michael Fabian 'Xaymar' Dirks
3952c33c60 filter-blur: Add Directional Blur (Motion Blur) and Step Scaling
Directional Blur (also known as Motion Blur in some art software) enables full control over the direction the passes are applied in, which can further be combined with the scaling option. With this very simple blur effects can have a massively bigger influence.

Step Scaling allows for improved control over individual Blur passes and can be combined with Directional Blur to imitate certain effects. It also allows smaller Blur sizes to cover a larger area, although with a drastic loss in final quality. For example, if someone is streaming at 720p and wants to have their dynamic 2160p background blurry to a very high degree, this option would allow that at next to no quality loss in the final stream. The actual values that need to be used vary for each source and encoder however, so they will have to be chosen carefully.
2018-12-23 19:54:57 +01:00
Michael Fabian 'Xaymar' Dirks
a6f9451654 filter-blur: Switch to Kernel Array instead of Kernel Texture
This speeds up Gaussian Blur and Linear Gaussian Blur drastically reduces time spent reading textures and instead uses existing registers - maximizing time spent reading the actual image texture.

See Also: #21 Blur Quality
2018-12-23 02:00:30 +01:00
Michael Fabian 'Xaymar' Dirks
92c4b54177 filter-blur: Add Linear Gaussian Blur
Similar to Linear Box Blur, this version of Gaussian Blur reduces the total number of sample by up to n. This results in a total sample count (per pass) of O(n+1) for even radii and O(n+2) for odd radii. The quality sacrificed to do this is higher this time, though careful adjustment of the halfTexelDelta value can bring it much closer to normal Gaussian Blur. The current offset however had no noticable effects on visual quality.

See Also: #21 Blur Quality
2018-12-22 22:54:30 +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
wwj402
0ad73bbf67 add chinese simplified language 2018-12-22 20:52:05 +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
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
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
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
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
3f3cbb8939 gs-mipmapper: Add mip level and remove bilinear from effect 2018-09-28 14:25:04 +02:00