-
-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transparency issues in gradients with alpha #39
Comments
Is this with version 2.2.1? I tried to replicate it, but no luck so far. |
I'm sorry. Yes, v2.2.1 and OBS Studio v30.0.2. With v2.1.3 works fine. The HS logo here: Or with the Composite Blur logo from the resources page https://obsproject.com/forum/resources/composite-blur.1780/ |
I am able to replicate it now and will investigate further. |
This is due to the Pre-Multiplied alpha issue that was fixed before. It looks like OBS does not pre-multiply alpha on image sources, for the first filter in the filter chain (all filters after do have pre-multiplied alpha). Here is how to test this with a few cases (and some workaround until we figure out how to fix it): Case 1:
Case 2:
Case 3:
This is a little tricky to fix, as there may be other sources that don't pre-multiply alpha to the original source, but it also depends on what order the filter is in the stack. @exeldro do you know if there is any way to determine if the source coming into the filter has pre-multiplied alpha? @COOLIGUAY: An interim workaround for you is to either add Quick edit to say- if you use the |
Thank you @exeldro and @FiniteSingularity ! I have tried your However, the alpha colors looks a little different from the original. I have used this png for the test: Applied the shine shader adding Then, a color correction filter at the top (also works if the filter is off). To mitigate this color issue i add another shader filter with the It's not perfect but it's more accurate. Could be the fix introduced in v2.2.0 an option in the settings? |
Unfortunately, it is not an easy toggle off/on. I'll dig into this a bit more, but doing |
Ok, so I've done some digging, and there is very strange behavior that goes on with image sources, and pre-multiplied alpha. Case 1Any source (that I've checked so far- video, media source, etc..) other than an Image Source. Color data is pre-multiplied by the source's alpha values, no matter where in the filter chain Case 2Image source, and Case 3Image source, and I've been able to replicate this behavior both with this plugin, as well as with my Advanced Mask plugin. |
I think we got a fix with this build: |
Thank you so much! Solves the halo issue when only add an empty shader filter, without loading any shader. The color issues still remains. I tested the new build with the png from the last test: If you add a shine shader, the alpha colors looks washed. With Adding another shader filter only with Tested with the HS logo and the bloom shader with and without |
Alpha gradients shows halos around, only applying the filter (is not needed to set any shader).
I have tried with my own images created in Photoshop and downloaded from websites.
Also with alpha gradient effects generated in obs like the Stroke Glow Shadow plugin.
The text was updated successfully, but these errors were encountered: