0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
OBS Studio - Free and open source software for live streaming and screen recording
Go to file
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
additional_install_files Improve additional_install_files for debug/release 2014-07-18 22:41:11 -07:00
CI CI: Use swig 3.0.12 on OSX 2019-05-02 18:39:59 -05:00
cmake Merge pull request #1678 from boxerab/libvlc_pkgconfig 2019-03-13 23:10:23 -05:00
config update build system to autotools (finally) 2013-10-29 23:21:40 -07:00
deps Merge pull request #1767 from ratwithashotgun/caption-pr1 2019-04-15 03:30:30 -07:00
docs libobs: Add multi-track support to non-encoded outputs 2018-10-04 20:32:35 -07:00
libobs libobs: Fix various alpha issues 2019-05-08 20:26:52 -07:00
libobs-d3d11 libobs: Fix various alpha issues 2019-05-08 20:26:52 -07:00
libobs-opengl libobs: Fix GS_UNSIGNED_LONG definition 2019-04-21 21:25:35 -07:00
plugins libobs: Fix various alpha issues 2019-05-08 20:26:52 -07:00
test test/test-input: Add audio buffering sync test source 2018-01-14 01:28:28 -08:00
UI Merge pull request #1869 from cg2121/fix-systray 2019-05-04 08:28:07 -07:00
.editorconfig .editorconfig: Add file to speed up editor configuration 2017-06-14 21:35:09 -05:00
.gitattributes Fix ffmpeg/x264 find modules according to cmake find module naming conventions 2014-05-22 13:03:47 +02:00
.gitignore UI: Remove and ignore obs.rc 2019-03-20 02:41:38 +01:00
.gitmodules enc-amf: Update to 2.5.0.1 and update repository address 2018-09-28 10:54:19 +02:00
.mailmap mailmap: Disambiguate between another author 2017-02-22 16:04:45 +01:00
.travis.yml CI: Build on Ubuntu Xenial for Travis CI 2019-03-12 06:56:25 +01:00
appveyor.yml CI: Add Restream secrets for AppVeyor 2019-03-27 02:23:23 +01:00
AUTHORS Update translations from Crowdin 2019-04-04 16:19:51 +02:00
azure-pipelines.yml CI: Build service integration on Azure Pipelines 2019-03-23 14:35:29 +01:00
CMakeLists.txt cmake: Generate obs.rc out-of-tree 2019-04-06 15:35:08 +02:00
COMMITMENT Add GPL Cooperation Commitment to base directory 2019-01-24 02:02:49 -05:00
CONTRIBUTING.rst CONTRIBUTING.rst: Improve commit guidelines 2019-04-13 01:52:25 -07:00
COPYING deps-w32-pthreads: Update FSF address 2015-07-11 09:10:27 -07:00
Doxyfile Add doxygen configuration file for obs. 2014-10-19 15:00:07 +02:00
INSTALL Update INSTALL 2018-07-14 08:21:00 +01:00
README.rst UI: Redo settings icons 2019-03-05 19:54:12 -06:00

OBS Studio <https://obsproject.com>
===================================

.. image:: https://travis-ci.org/obsproject/obs-studio.svg?branch=master
   :alt: OBS Studio Build Status - Travis CI
   :target: https://travis-ci.org/obsproject/obs-studio

.. image:: https://ci.appveyor.com/api/projects/status/github/obsproject/obs-studio?branch=master&svg=true
   :alt: OBS Studio Build Status - AppVeyor CI
   :target: https://ci.appveyor.com/project/jp9000/obs-studio/branch/master

.. image:: https://dev.azure.com/obsjim/obsjim/_apis/build/status/obsproject.obs-studio?branchName=master
  :alt: OBS Studio Build Status - Azure Pipelines
  :target: https://dev.azure.com/obsjim/obsjim/_build/latest?definitionId=1&branchName=master

.. image:: https://discordapp.com/api/guilds/348973006581923840/widget.png?style=shield
   :alt: OBS Studio Discord Server
   :target: https://obsproject.com/discord

What is OBS Studio?
-------------------

  OBS Studio is software designed for capturing, compositing, encoding,
  recording, and streaming video content, efficiently.

  It's distributed under the GNU General Public License v2 (or any later
  version) - see the accompanying COPYING file for more details.

Quick Links
-----------

 - Website: https://obsproject.com

 - Help/Documentation/Guides: https://github.com/obsproject/obs-studio/wiki

 - Forums: https://obsproject.com/forum/

 - Build Instructions: https://github.com/obsproject/obs-studio/wiki/Install-Instructions

 - Developer/API Documentation: https://obsproject.com/docs

 - Bug Tracker: https://obsproject.com/mantis/

   (Note: The bug tracker is linked to forum accounts.  To use the bug
   tracker, log in to a forum account)

Contributing
------------

 - If you wish to contribute code to the project, please make sure to
   read the coding and commit guidelines:
   https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst

 - Developer/API documentation can be found here:
   https://obsproject.com/docs

 - If you wish to contribute translations, do not submit pull requests.
   Instead, please use Crowdin.  For more information read this thread:
   https://obsproject.com/forum/threads/how-to-contribute-translations-for-obs.16327/

 - Other ways to contribute are by helping people out with support on
   our forums or in our community chat.  Please limit support to topics
   you fully understand -- bad advice is worse than no advice.  When it
   comes to something that you don't fully know or understand, please
   defer to the official help or official channels.