obsproject / obs-browser

CEF-based OBS Studio browser plugin
GNU General Public License v2.0
776 stars 220 forks source link

Premultiplied alpha blend state instead of math #318

Closed jpark37 closed 2 years ago

jpark37 commented 2 years ago

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

Checklist:

jpark37 commented 2 years ago

In draft mode until required PR is merged.

jpark37 commented 2 years ago

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