Commit Graph

52 Commits (7aedf7833859047dfd9a4ad85bd4da11b896c817)

Author SHA1 Message Date
jpark37 9d7330ca44 obs-transitions: Blend in linear space
Color mismatch is apparent when using source transitions, which lerps
against transparent black and blends into the canvas nonlinearly. When
the transition is done, the blend switches to linear, leading to a pop.

Fix the issue by blending into the canvas in linear space. The lerp is
still nonlinear by design.
2021-05-08 20:53:44 -07:00
jpark37 6124a373f6 obs-transitions: Nonlinear SRGB, fade to color
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
Stéphane Lepin 506434c5e6 obs-transitions: add track matte feature to the stinger transition
This adds the ability to use a secondary black-and-white video as a mask
between source A and B of the transition. The greyscale value of each
pixel is used as the "slider" value in a linear interpolation between the
corresponding pixels in source A and source B.
The track matte can either be in the same file as the stinger itself
(next to the stinger or under the stinger, doubling the width or height
of the stinger depending of the selected layout) or a in a separate
dedicated file.
The same file/separate file behavior is controlled by the
"Matte Layout" option in the stinger settings.
2021-02-06 17:14:07 -08:00
jpark37 18184e0175 obs-transitions: Linear SRGB, fade to color 2021-01-21 07:42:57 -08:00
Gol-D-Ace 7368a2c7cc Update translations from Crowdin 2020-12-14 00:29:44 +01:00
Gol-D-Ace 7ab98ca00f Update translations from Crowdin 2020-11-25 20:11:39 +01:00
Matt Gajownik 4a53958c87 obs-transitions: Expose hardware decoding for Stingers
This also enables hardware decoding by default for stingers.

Note: per c2a2bc5e40 this will not affect
webm files with alpha.
2020-10-23 22:34:24 -07:00
Gol-D-Ace c66ebde080 Update translations from Crowdin 2020-09-27 23:07:27 +02:00
Gol-D-Ace d74fc65047 Update translations from Crowdin 2020-03-16 20:14:50 +01:00
Gol-D-Ace 03b5be75e4 Update translations from Crowdin 2019-09-17 23:21:00 +02:00
Clayton Groeneveld 3ea354b4e4 UI, obs-plugins: Add spinbox suffixes where necessary 2019-07-18 04:03:38 -05:00
Gol-D-Ace 973bc481ce Update translations from Crowdin 2019-06-11 01:42:42 +02:00
James Park ba21fb947e libobs: Fix various alpha issues
There are cases where alpha is multiplied unnecessarily. This change
attempts to use premultiplied alpha blending for composition.

To keep this change simple, The filter chain will continue to use
straight alpha. Otherwise, every source would need to modified to output
premultiplied, and every filter modified for premultiplied input.

"DrawAlphaDivide" shader techniques have been added to convert from
premultiplied alpha to straight alpha for final output. "DrawMatrix"
techniques ignore alpha, so they do not appear to need changing.

One remaining issue is that scale effects are set up here to use the
same shader logic for both scale filters (straight alpha - incorrectly),
and output composition (premultiplied alpha - correctly). A fix could be
made to add additional shaders for straight alpha, but the "real" fix
may be to eliminate the straight alpha path at some point.

For graphics, SrcBlendAlpha and DestBlendAlpha were both ONE, and could
combine together to form alpha values greater than one. This is not as
noticeable of a problem for UNORM targets because the channels are
clamped, but it will likely become a problem in more situations if FLOAT
targets are used.

This change switches DestBlendAlpha to INVSRCALPHA. The blending
behavior of stacked transparents is preserved without overflowing the
alpha channel.

obs-transitions: Use premultiplied alpha blend, and simplify shaders
because both inputs and outputs use premultiplied alpha now.

Fixes https://obsproject.com/mantis/view.php?id=1108
2019-05-08 20:26:52 -07:00
Gol-D-Ace e78ac5ebef Update translations from Crowdin 2019-04-04 16:19:51 +02:00
Gol-D-Ace 98f78fe3a7 Update translations from Crowdin 2019-02-25 15:11:33 +01:00
Gol-D-Ace c3711bdd5e Update translations from Crowdin 2019-02-20 22:26:07 +01:00
Gol-D-Ace a79aaa28ab Update translations from Crowdin 2018-08-18 04:16:35 +02:00
Gol-D-Ace 88282c168c Update translations from Crowdin 2018-03-15 09:00:28 +01:00
Gol-D-Ace ae22886f67 Update translations from Crowdin 2018-01-22 04:55:52 +01:00
jp9000 7bd06e7f26 Update translations from Crowdin 2017-10-17 05:39:22 -07:00
Makeenon 006fc35a2d obs-transition: Add crossfade option to stinger
Add option in properties that let you choose how audio is mixed during
transition:
- Fade Out/Fade In (existing behavior, default)
- Crossfade

Closes jp9000/obs-studio#1028
2017-09-16 13:59:49 -07:00
Michel dab278e1b6 obs-transitions: Add audio monitoring to stinger
Closes jp9000/obs-studio#1001
2017-09-16 12:35:17 -07:00
Gol-D-Ace 8d8c2e5a22 Update translations from Crowdin 2017-08-10 16:07:40 +02:00
jp9000 4821ab8ae8 obs-transitions: Fix stinger transition locale
Changes "TransitionPoint" back to "Transition Point (milliseconds)" and
adds "TransitionPointFrame" locale when frame index mode is selected.
2017-08-08 08:13:45 -07:00
derrod aa6bd58ce3 obs-transitions: Add frame transition point option to stinger
Allows the user to specify a frame instead of a timestamp for
the transition point.
2017-08-08 10:08:23 +02:00
jp9000 1dab263403 obs-transitions: Add stinger transition
Allows using a video file as a means of transitioning, transitioning two
targets at a specific time during the video playback.  Audio for target
A fades out to the transition point, and then audio for target B fades
in after the transition point.
2017-07-19 16:23:06 -07:00
Gol-D-Ace 3d2cacd782 Update translations from Crowdin 2017-05-20 10:18:41 +02:00
Richard Stanway a23c009a69 Various: Optimize bundled PNG files
By losslessly recompressing and removing redundant metadata, this saves
around 910 KB.
2017-05-05 19:56:00 +00:00
Gol-D-Ace dbf95bdc15 Update translations from Crowdin 2017-03-05 23:40:11 +01:00
Gol-D-Ace de1bbf4342 Update translations from Crowdin 2017-03-04 07:04:03 +01:00
Gol-D-Ace a13c0a3c29 Update translations from Crowdin 2017-02-27 20:54:02 +01:00
jp9000 e1e21c01d5 obs-transitions: Convert premultiplied alpha to straight
In transitions, because the 'to' and 'from' are always rendered to
textures, the end result will always have premultiplied alpha.  This
would cause alpha to have blackish edges during transition, and cause
semi-transparent images to appear darker than they were supposed to.

To replicate, simply set the transparency of a source to 50%, then
transition between that scene and another scene.  The source will appear
to "pop" in and out unnaturally due to the premultiplied alpha effect of
the render targets.

To fix this, the solution is to simply convert premultiplied alpha to
straight alpha in the transition pixel shaders.
2017-02-06 13:22:51 -08:00
Gol-D-Ace 6223ed6520 Update translations from Crowdin 2017-01-07 00:23:16 +01:00
Gol-D-Ace 69f0bc244a Update translations from Crowdin 2016-12-23 20:46:47 +01:00
jp9000 e87031f4d6 Revert "obs-transitions: Avoid branching in slide_transition.effect"
This reverts commit 0edaebe192.

The commit was actually less optimal than it was before.  Shaders are
always fully unfolded and both sides of a branch are always executed.
Despite that fact, the "avoid branching" commit actually *added* two
extra unnecessary instructions with the same number of actual sample
instructions, making it arguably less optimal than before.

This was tested via the D3DDissamble function.
2016-11-25 12:20:42 -08:00
jp9000 ed85b22534 Update translations from CrowdIn 2016-11-03 13:32:52 -07:00
Michael Fabian Dirks 0edaebe192 obs-transitions: Avoid branching in slide_transition.effect
Branching is not recommended in shaders and only recently gained
widespread support without causing massive branch misprediction issues. Also sampling inside a branch will cause cache misses and additional texture load instructions.
2016-10-29 13:09:11 +02:00
Gol-D-Ace aadc7263c0 Update translations from Crowdin 2016-09-28 01:17:24 +02:00
Gol-D-Ace cb036b2713 Update translations from Crowdin 2016-08-08 16:21:48 +02:00
hwdro 938943e72b obs-transitions: Add 'Luma Wipe' transition
Closes jp9000/obs-studio#558
2016-07-20 07:05:27 -07:00
Gol-D-Ace 81adb13f59 Update translations from Crowdin 2016-07-06 01:18:27 +02:00
Gol-D-Ace fe56a12867 Update translations from Crowdin 2016-05-14 00:27:59 +02:00
Gol-D-Ace c2e4926323 Update translations from Crowdin 2016-04-24 19:55:39 +02:00
Gol-D-Ace 5ed7081213 Update translations from Crowdin 2016-04-23 10:29:21 +02:00
hwdro 262599f0f2 obs-transitions: Add 'Fade to Color' transition
Closes jp9000/obs-studio#521
2016-03-24 16:23:29 -07:00
hwdro e3a9f395a6 obs-transitions: Add 'slide' transition
Closes jp9000/obs-studio#516
2016-03-24 02:19:16 -07:00
jp9000 69da1151e0 Update translations from Crowdin 2016-03-19 12:08:48 -07:00
jp9000 f33f8d8e6f obs-transitions: Add 'swipe' transition 2016-03-01 15:18:58 -08:00
Gol-D-Ace 2b7036dc93 Add latest translations from Crowdin 2016-02-21 22:16:12 +01:00
dodgepong ea9db8249b Add latest translations from CrowdIn 2016-01-31 18:28:35 -05:00