FiniteSingularity / obs-stroke-glow-shadow

An OBS plugin to provide efficient Stroke, Glow, and Shadow effects on masked sources.
GNU General Public License v2.0
96 stars 7 forks source link

[BUG] - Outer Shadow applies color correction #20

Closed iammesutkaya closed 9 months ago

iammesutkaya commented 9 months ago

Describe the bug Applying an outer shadows, seems to apply some sort of color correction

To Reproduce Steps to reproduce the behavior:

  1. Apply Shadow filter
  2. Choose Outer Shadow

Expected behavior There shouldn't be any color correction

Screenshots CleanShot 2023-10-05 at 12 13 14@2x CleanShot 2023-10-05 at 12 13 26@2x

Environment

GPU

Additional context Didn't have the bug with the previous version

FiniteSingularity commented 9 months ago

Thank you for opening the issue @iammesutkaya. May I ask what type of source you're applying the filter to, so that I can replicate the issue? It looks like it might be a camera source embedded in a scene or group?

iammesutkaya commented 9 months ago

Yes, I initially noticed it on a camera source, but then tested it again on a color source. Same behaviour.

CleanShot 2023-10-05 at 14 33 56@2x CleanShot 2023-10-05 at 14 34 01@2x

FiniteSingularity commented 9 months ago

Thank you for this. I'll take a look at it this morning and try to figure out what is going on (it likely has to do with the conversion from sRGB color space to linear color space and back, which is necessary for proper mixing).

In the short term- a workaround would be to use the effect source (rather than the filter) and layer the shadow behind your webcam source. The effect source only uses your source as a mask, but doesn't attempt to mix any colors (and leaves the compositing/color mixing up to OBS). Something you might want to try as I work to fix this issue.

iammesutkaya commented 9 months ago

Yeah, that should work, thanks! Glad I could help!

FiniteSingularity commented 9 months ago

I have confirmed the bug on Windows as well in the latest version of the code. Looking into it this morning.

FiniteSingularity commented 9 months ago

Hi @iammesutkaya -

I found what was causing the issue and fixed it. I've merged in the changes, and will be generating a 1.0.1 release shortly. Please give the 1.0.1 release a try, and verify that it fixes the issue for you.

FiniteSingularity commented 9 months ago

Ok, v1.0.1 with the fix is available at https://github.com/FiniteSingularity/obs-stroke-glow-shadow/releases/tag/v1.0.1

iammesutkaya commented 9 months ago

Yes, it's fixed! Thank you!