FiniteSingularity / obs-retro-effects

A collection of OBS filters to give your stream that retro feel.
GNU General Public License v2.0
113 stars 4 forks source link

Dither Filter: Add toggle to round samples to nearest output pixel #12

Closed y2kcyborg closed 8 months ago

y2kcyborg commented 9 months ago

The Dither filter doesn't currently have an option to sample the source at the same pixel size as the dither. While it's possible to achieve that by scaling the source before and after the filter, it's much more convenient to have a toggle available.

This PR also refactors the shader to extract common code, but I put that in a separate commit.

Toggled off (current behavior):

dither-round-off

Toggled on:

dither-round-on

FiniteSingularity commented 9 months ago

Hi @y2kcyborg,

Thank you for the PR, it looks like a great option to have. I'll give it a try/deep look later this weekend, and hopefully get it merged in quickly.

y2kcyborg commented 9 months ago

I just remembered that I did something slightly different in another dither shader - I have a "pixel scale" slider and then a "dither superscale" slider, with the dither size being the product of the two - not sure which is most useful for potential users

FiniteSingularity commented 8 months ago

I just remembered that I did something slightly different in another dither shader - I have a "pixel scale" slider and then a "dither superscale" slider, with the dither size being the product of the two - not sure which is most useful for potential users

Sorry for the delay.. the week has been getting away from me a bit. I'll merge this in as-is, and play around with it, and we can always tweak the UI in another PR.