Commit Graph

64 Commits

Author SHA1 Message Date
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
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 ded5896fca gs-texture: Add get_color_format method 2018-09-27 05:11:37 +02:00
Michael Fabian 'Xaymar' Dirks e8da137ab6 filter-custom-shader: Basic custom shader support
The Custom Shader Filter is now capable of rendering a custom shader using the gfx::effect_source class as a backend. An example shader is provided for starting off, more advanced examples may come later.

Related: #5
2018-04-29 03:07:26 +02:00
Michael Fabian 'Xaymar' Dirks 0957ce0bb9 gfx-effect-source: Implement basic functionality
Rendering is now possible, although some parameter types are not yet supported. So far, booleans and floats will work fine, integers will cause an error in OBS Studios rendering code for an unknown reason.
2018-04-29 03:05:53 +02:00
Michael Fabian 'Xaymar' Dirks 365b390e68 source-mirror: Description for Audio property 2018-04-29 00:16:31 +02:00
Michael Fabian 'Xaymar' Dirks af71a7cc1d filter-blur: Allow applying Blur to a sub-region of the source only
The Blur Filter can now be applied to a region inside the source itself, the inverse of that region, and/or a feathered version of that region. This allows for easier scene setups where only some parts need to be blurred, but the rest can be left as is.

Fixes #12
2018-04-29 00:14:29 +02:00
Michael Fabian 'Xaymar' Dirks 1ba9145fbd filter-blur: Use only a single Gaussian Kernel Texture 2018-04-28 14:41:18 +02:00
Michael Fabian 'Xaymar' Dirks 410ba9df88 source-mirror: Implement mirroring of Source Audio
From this point on, Source Mirror is now capable of real-time mirroring of Video and Audio. This can help if you need different filters per scene for your microphone or voice chat, depending on the scene (audio ducking for pause scene, no audio ducking for live gaming).
2018-04-27 23:38:49 +02:00
Michael Fabian 'Xaymar' Dirks 92820bf606 filter-custom-shader: Add example shader 2018-03-20 12:51:08 +01:00
Michael Fabian 'Xaymar' Dirks 26b447901c filter-custom-shader: Implement new Filter 'Custom Shader'
Custom Shader allows you to write your own effect files and just have them applied to your source(s). It will dynamically update the properties to match the parameters in the source as well as offer some special parameters to the shader.

# Conflicts:
#	CMakeLists.txt
#	data/locale/en-US.ini

# Conflicts:
#	data/locale/en-US.ini
2018-01-19 20:46:54 +01:00
Michael Fabian 'Xaymar' Dirks 6ce68e5f15 data: Replace LFS content with actual files
I'm not sure how this passed by so many people, but I guess it explains why people didn't know what the Displacement Filter does.
2018-01-19 20:46:21 +01:00
Michael Fabian 'Xaymar' Dirks 662199fb4a source-mirror: Fix scaling issues and allow keeping original size
Scaling was previously incorrectly rendering the source with another effect forced onto it, resulting in slower rendering and some sources that would no longer render properly.

Additionally the new option allows the user to have the source render at the original resolution in order to allow previously applied transform to stay identical. The rescaling however will no longer apply to filters after this source then, thus the speed bonus is lost.

Also categorized the localization file and adds descriptions for existing and new properties for Source Mirror.
2018-01-19 04:15:40 +01:00
Michael Fabian 'Xaymar' Dirks add8012549 source-mirror: Add a Source Mirror source
The source allows you to apply effects to the same source without requiring a new instance of the source. Any changes done to the original source also apply to the mirror, so there is less total work that needs to be done.

It can also rescale the source, allowing you to use the same source as a cheap instant backdrop with Blur for example. What you do in the end is completely unwritten and up to you to decide.
2017-12-14 08:46:36 +01:00
Xaymar 2f55841f88 effect: Code update, clean up and optimization 2017-10-22 19:05:29 +02:00
Michael Fabian Dirks 88cc142afb gs, effects: Anisotropic Mipmapper Class
End goal of this is to be an anisotropic filtering purely on the GPU without any actual mipmaps in the graphics subsystem. The basic idea behind it is that we can create all possible mipmaps in a twice as big texture as the original and then can efficiently render it no matter the GPU features as it will only consume one sampler.

The texture that it outputs will have both horizontal, vertical and full mipmaps in it. Horizontal mipmaps reduce Width, Vertical mipmaps reduce Height and full mipmaps reduce both. This means that LoD levels are both possible in the X and Y direction, allowing for much greater precision mipmapping on all GPUs.

This is a temporary solution until we can directly copy updated textures to a mipmap level.
2017-09-18 00:05:54 +02:00
Michael Fabian Dirks 22bf3845c0 locale: Update to current code 2017-09-18 00:05:53 +02:00
Michael Fabian Dirks 52b70ff6de locale: Update to new code 2017-08-20 00:31:39 +02:00
Michael Fabian Dirks 6cc1be1b0d effect: Minor formatting changes 2017-08-20 00:25:20 +02:00
Michael Fabian Dirks 4dbf414214 effects, filter-blur: Precalculated Kernel, Formatting, Rendering and more
Filter:
* Massively improved Rendering loop to reduce overhead and provide cleaner code.

Gaussian Blur:
* Added precalculated Kernels using Textures. Slightly reduced GPU load.
* Added basic attempt at a Nvidia o(n/2+1) gaussian blur implementation.
* Fix up LOD for texture sampling.

Box Blur:
* Halved loop count.
2017-08-20 00:25:05 +02:00