obs-studio/plugins
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
..
coreaudio-encoder Update translations from Crowdin 2019-04-04 16:19:51 +02:00
decklink libobs: Support limited color range for RGB/Y800 sources 2019-04-25 15:13:05 -07:00
enc-amf@47c3c728af enc-amf: Update translations 2019-02-25 08:07:08 -08:00
image-source Merge pull request #1781 from cg2121/color-source-default-size 2019-04-10 17:38:51 -07:00
linux-alsa Update translations from Crowdin 2019-04-04 16:19:51 +02:00
linux-capture linux-capture: Add randr support 2019-04-05 16:05:59 -05:00
linux-jack Update translations from Crowdin 2019-04-04 16:19:51 +02:00
linux-pulseaudio Update translations from Crowdin 2019-04-04 16:19:51 +02:00
linux-v4l2 Update translations from Crowdin 2019-04-04 16:19:51 +02:00
mac-avcapture Update translations from Crowdin 2019-04-04 16:19:51 +02:00
mac-capture Update translations from Crowdin 2019-04-04 16:19:51 +02:00
mac-syphon Update translations from Crowdin 2019-04-04 16:19:51 +02:00
mac-vth264 UI: Add ability to set properties spinbox suffix 2019-05-02 08:54:14 -07:00
obs-browser@c1123b9806 UI: Remove mac browser workarounds, improve stability 2019-05-01 12:13:35 -07:00
obs-ffmpeg obs-ffmpeg: Fix jim-nvenc initial DTS for fractional FPS 2019-05-02 12:45:17 -07:00
obs-filters obs-filters: Use int sliders for opacity 2019-04-26 06:33:41 -07:00
obs-libfdk Update translations from Crowdin 2019-04-04 16:19:51 +02:00
obs-outputs obs-outputs: Fix leak with certs for rtmp 2019-04-21 23:54:27 +02:00
obs-qsv11 UI: Add ability to set properties spinbox suffix 2019-05-02 08:54:14 -07:00
obs-text Update translations from Crowdin 2019-04-04 16:19:51 +02:00
obs-transitions libobs: Fix various alpha issues 2019-05-08 20:26:52 -07:00
obs-vst@fde438f7a8 obs-browser, obs-vst: Update translations 2019-02-20 19:57:41 -08:00
obs-x264 UI: Add ability to set properties spinbox suffix 2019-05-02 08:54:14 -07:00
rtmp-services rtmp-services: Update GameTips.tv 2019-05-02 19:38:47 -07:00
text-freetype2 Merge pull request #1800 from cg2121/add-pragma-once 2019-04-06 23:40:43 -07:00
vlc-video vlc-video: Enable subtitle track selection 2019-04-17 06:45:33 -07:00
win-capture win-capture/graphics-hook: Check if mutex abandoned 2019-04-14 03:44:48 -07:00
win-dshow libobs: Support limited color range for RGB/Y800 sources 2019-04-25 15:13:05 -07:00
win-ivcam cmake: Make static VC runtime libraries consistent 2018-09-12 07:49:13 -07:00
win-mf Update translations from Crowdin 2019-04-04 16:19:51 +02:00
win-wasapi win-wasapi: Unapply/reapply audio monitoring on reconnect 2019-04-20 03:37:24 -07:00
CMakeLists.txt cmake: Fix UI being dependent on browser plugin files 2018-09-18 08:56:34 -07:00