8 Commits

Author SHA1 Message Date
jpark37
9e3dfa2409 obs-filters: Premultiply alpha for precision
For Apply LUT, and Luma Key, multiply alpha in shader instead of blend
unit for extra precision.
2021-05-14 01:01:05 -07:00
jpark37
ae7718a765 libobs, obs-filters: SRGB backwards compatibility
Add OBS_SOURCE_SRGB to indicate sources that support SRGB rendering. We
can use this flag to know which sources do not know how to handle SRGB,
and disable accordingly inside obs_source_main_render().

We can also use this flag to clean up the filter interface and remove
the SRGB-specific functions. We also need to disable direct rendering if
the filter source wants to render SRGB, but the parent source does not
support it.

Scenes and groups are marked as having SRGB support, and those are
internal sources that we control.
2021-05-03 01:19:56 -07:00
jpark37
607ee098c5 obs-filters: Handle premultiplied alpha input
Mostly by converting to straight alpha in shader when necessary.
2021-04-28 18:09:52 -07:00
jpark37
92eb756dab obs-filters: Increase luma key precision 2021-04-13 12:43:25 -07:00
jpark37
0e803c4443 obs-filters: Fix unused parameters 2021-01-29 21:50:32 -08:00
jpark37
ad2527765f obs-filters: Apply luma key filter in linear space
Also switch from 601 to 709 luma coefficients to match other filters.
2021-01-21 07:57:43 -08:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
Colin Edwards
609c7dfa2a obs-filters: Add luma key filter 2019-03-20 11:37:38 -05:00