Skip to content

Premultiplied alpha blend state instead of math - #318

Merged
jp9000 merged 3 commits into
obsproject:masterfrom
jpark37:srgb-decompress
Oct 1, 2021
Merged

Premultiplied alpha blend state instead of math#318
jp9000 merged 3 commits into
obsproject:masterfrom
jpark37:srgb-decompress

Conversation

@jpark37

@jpark37 jpark37 commented Sep 30, 2021

Copy link
Copy Markdown
Contributor

Description

This is an attempt to preserve RGB channels to behave like Chrome. This
should work on a black background, but blending against anything else
will be done in linear space, and may not look as expected.

Requires obsproject/obs-studio#5354

Motivation and Context

People want semi-transparency to work as expected.

How Has This Been Tested?

WebM video supplied by #5347 seems to look like Chrome in browser source with or without default custom CSS.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@jpark37

jpark37 commented Sep 30, 2021

Copy link
Copy Markdown
Contributor Author

In draft mode until required PR is merged.

Code is about to stale, so just remove for now.
This is an attempt to preserve RGB channels to behave like Chrome. This
should work on a black background, but blending against anything else
will be done in linear space, and may not match previous OBS behavior.
Adapt existing fix for Windows game capture.
@jpark37
jpark37 marked this pull request as ready for review October 1, 2021 05:44
@jpark37

jpark37 commented Oct 1, 2021

Copy link
Copy Markdown
Contributor Author

Seems to work as I expect on Windows, Ubuntu, and macOS (with and without browserhwaccel).

@jp9000
jp9000 merged commit 9d15e25 into obsproject:master Oct 1, 2021
@jpark37
jpark37 deleted the srgb-decompress branch October 1, 2021 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants