obs-shaderfilter

obs-shaderfilter 2.3.2

NorrinRadd22

New Member
Monumental release. Definitely eases the pain of StreamFX changing their business model with OBS 29. I finally made the switch today, and I am in the process of rebuilding all of my scenes. I am able to cover almost everything I could do in StreamFX with this (Corner pin <3), and that is incredible, and I appreciate your work so much.

The only thing I am curious about, is if I can load .effect files from the StreamFX archive in this? I have tried with no effect. I am trying to add a scanline effect to a monitor. I am great at brute forcing though, and usually have no idea technically what I am doing. This might actually be possible, I just haven't found the way yet.
 

ZynnRG

New Member
Hello! Is there a version of this that works for OBS 27?? I would love to upgrade to 28 but a lot of the plugins I currently use only support v27.
Much love! Thanks in advance.
 

Destroy666

Member
This is so incredible and powerful. It even works on groups.

Wondering if there's some shader I can use for transparent background (basically all fully transparent pixels transformed into a transparent color or just a layer behind all pixels, if possible), to solve this: https://obsproject.com/forum/threads/background-for-a-whole-group.168853/ Unfortunately I only found `opacity` one in examples. I don't know much about shaders so no idea if I can find a compatible one on the internet.
 
Last edited:

Destroy666

Member
I found another one that's supposed to be background according to description on plugin's page - night_sky - but unfortunately it's in the foreground and can't really use it as an example :(
 

Exeldro

Active Member
@Destroy666 something like this?
Code:
uniform float4 bgcolor;
float4 mainImage(VertData v_in) : TARGET
{
    float4 c = image.Sample(textureSampler, v_in.uv);
    if(c.a < 0.5)
        return bgcolor;
    return c;
}
 

khaver

Member
I found another one that's supposed to be background according to description on plugin's page - night_sky - but unfortunately it's in the foreground and can't really use it as an example :(
What you would do is add the "night-sky" shader to a placeholder image source in your scene. Then add your image or video that has transparency (or green screen with color key filter) above the "night-sky" image in the scene sources list. The "night-sky" shader will show through the transparent parts.
 

Destroy666

Member
What you would do is add the "night-sky" shader to a placeholder image source in your scene. Then add your image or video that has transparency (or green screen with color key filter) above the "night-sky" image in the scene sources list. The "night-sky" shader will show through the transparent parts.
That's what I precisely want to avoid because I don't want to create images with weird shapes, which are not rectangular.


@Destroy666 something like this?
Code:
uniform float4 bgcolor;
float4 mainImage(VertData v_in) : TARGET
{
    float4 c = image.Sample(textureSampler, v_in.uv);
    if(c.a < 0.5)
        return bgcolor;
    return c;
}

Thanks, the initial version had some errors that I also managed to correct, this one looks right. BTW, how to debug these shaders? Where to look for syntax etc. errors? Is there a quick way to know if it errored out or just did no changes? Perhaps showing some kind of red text below the file input could be an improvement.

And another question - I saw that the variables get automatically added as options. Some are defined as widgets with several properties. Is there any documentation of these widgets - what kind of can be used and what their properties are?
 
Last edited:

khaver

Member
That's what I precisely want to avoid because I don't want to create images with weird shapes, which are not rectangular.
I'm not sure what you mean by this. My assumption of what you are trying to do is have a "night-sky" background (created using a shader), with foreground images or videos with transparency so you see the "night-sky" behind the foreground images. The placeholder image that you apply the "night-sky" shader to is just to give the shader a set resolution (the resolution of the image) to work with. It would not visually contribute in any way to the image being presented by the shader. I'm assuming the "night-sky" shader is stars, maybe some clouds, and possibly the Moon.
 

khaver

Member
Here's what I believe you are trying to accomplish with the night_sky shader.

I have a placeholder image (Image 4) as a background, and an image with transparency (Welcome to Our Church) placed above the placeholder image.
NightShader01.jpg


I add the "Night_Sky" shader to the placeholder image.
NightShader02.jpg


Isn't this your intended result?
NightShader03.jpg
 

Destroy666

Member
No. This is rectangular. As I said, I'm not looking for simple use cases like this. This is a quick example made in paint of few grouped elements:
1691804148021.png

I want to colorize the background of whole group wherever it's empty and it consists of various kinds of elements.

Anyways, like I said, my issue was solved with the shader above, much simplier than playing with images/texts/whatever placed beneath the real elements.
 

Destroy666

Member
And if you want for the night one to work with that as background BTW, you can change in night_sky.shader:
Code:
    float4 rgba;//= image.Sample(textureSampler, v_in.uv);
to e.g. (for just skipping non-transparent pixels):
Code:
    float4 rgba = image.Sample(textureSampler, v_in.uv);
    if (rgba.a == 0)
        return rgba;

Not hard once you understand what the in-built functions do :P
 

rusty1

Member
I've always relied on this plugin mostly for the round corners. For some reason, a need to use the old rounded_stroke.shader file from 2022 for it to work on Mac, even after installing the updated pkg for OBS 29.1, in order for the plugin to show up, both Intel and Silicon.

I really would love to get box-blur or a gaussian blur to work, but can't seem to get anything but a black screen on either mac m1 or Intel. I log error "Unable to create effect. Errors returned from parser."
 

Destroy666

Member
Is there anything for flashing lights except shine.shader? Couldn't find anything else and I'm trying to get 2x different color to flash right after eachother, preserving the order. So let's say blue -> green fading in and out one after other over and over again, with small pauses between cycles. The closest I got was 2 different mentioned filters with the same parameters for both speeds + "gradient percents" and reverse checkbox for one of them, but that doesn't preserve the order and goes blue -> green -> green -> blue.

Any other shader I can use? Or maybe I'm missing some weird setup with the 2x shine filter?
 

Rachel Mae

New Member
And there it is, the last major StreamFX feature that was keeping me tethered to OBS 27, dynamic masks. Finally I can move on. Thank you so much!

I do have a minor request, though: would it be possible to sort the list of input sources alphabetically? It currently displays them in some vaguely random order, which isn't ideal if you have a huge list of sources. Also, each group of sliders seems to be missing its respective header (Red/Green/Blue/Alpha), which makes things kinda confusing if you're not familiar with the original plugin.
 
Top