nleseul / obs-shaderfilter

OBS Studio filter for applying an arbitrary shader to a source.
The Unlicense
101 stars 119 forks source link

Override output size #10

Open zed9h opened 5 years ago

zed9h commented 5 years ago

If I have a shader like this:

float4 mainImage(VertData v_in) : TARGET {
    return float4(
        image.Sample(textureSampler, v_in.uv * float2(0.5,1)).rgb, 
        image.Sample(textureSampler, v_in.uv * float2(0.5,1) + float2(0.5,0)).r
    );
}

the output should be half the size, but the shader is computing the full size, just to be resized by a transform afterwards.

nleseul commented 5 years ago

Good suggestion, and probably not too hard to add. I'd just need to come up with a way to add this option without cluttering the options more than they already are.