FiniteSingularity / obs-composite-blur

A comprehensive blur plugin for OBS that provides several different blur algorithms, and proper compositing.
GNU General Public License v2.0
382 stars 31 forks source link

[BUG] - Cannot set 0 value on Pixelate filter #17

Closed JDDoesDev closed 1 year ago

JDDoesDev commented 1 year ago

Describe the bug When trying to set up pixelate filter on a source and using Exeldro's Move Value transition alongside this plugin I am unable to set the value of the idle filter to 0 px which causes a slight blur on the source. Setting the value to 0 would allow for the filter to be active and use the move value transition to animate the blur on and off.

To Reproduce Steps to reproduce the behavior:

  1. Add a move transition filter (assuming use of Exeldro's plugin)
  2. Attempt to set the value in the move transition settings to 0.
  3. Notice that you are unable to set to anything below 0.

Expected behavior I expect that I should be able to set the value to 0 so that I can use the transition to adjust the value between 0 and a positive number.

Screenshots If applicable, add screenshots to help explain your problem.

Environment

FiniteSingularity commented 1 year ago

Thank you for opening the issue. I can see how it would be a little confusing, however this is actually working as intended, as a pixel at size 1, is just the original pixel (so in terms of pixelization, 1 pixel is zero blur). We could allow the value to go to zero, as there is a check to see if the value is 1 or smaller, it just passes through the original frame. Is there any particular use case where having it go to zero is needed? Would it be less confusing to allow the slider to go to zero?

JDDoesDev commented 1 year ago

I didn't have anyone in chat answering when I was attempting to use the transition, but in studio mode when enabling and disabling at 1.00 it seemed that there was a bit of a blurring, although minor. Let me see if I can find it in the VOD.

FiniteSingularity commented 1 year ago

Its definitely possible. It may have something to do with the float error that comes in, where a value of 1.0 is actually 1.0000001, which is greater than 1, so it isn't passing through the source. If that is the case, I can set an epsilon value to catch float rounding errors.

JDDoesDev commented 1 year ago

https://www.twitch.tv/videos/1912841249 at 4:02:20 roughly.

There is some minor blurring, but after reviewing the VOD it is almost imperceptible. I'll let you take a look and decide if it's enough to put in a fix for, however I'm willing to close this as invalid after checking the VOD.

FiniteSingularity commented 1 year ago

I am going to close this one for now, as "works as expected." I am still considering allowing a "dummy" zero value for Pixelate and Dual Kawase, but that would come in the next feature release.

FiniteSingularity commented 1 year ago

@all-contributors please add @JDDoesDev for bug

allcontributors[bot] commented 1 year ago

@FiniteSingularity

I've put up a pull request to add @JDDoesDev! :tada: