@5am If there is "Sharpness" filter on mac and you don't use it, then you can replace the shader program of the filter (named "sharpness.effect") by this text:
C:
// Based on Sharpness shader of OBS Studio v27.0.0,
// And https://github.com/Oncorporation/obs-shaderfilter/
uniform float4x4 ViewProj;
uniform texture2d image;
uniform float sharpness;
uniform float texture_width;
uniform float texture_height;
sampler_state def_sampler {
Filter = Linear;
AddressU = Clamp;
AddressV = Clamp;
};
struct VertData {
float4 pos : POSITION;
float2 uv : TEXCOORD0;
};
VertData VSDefault(VertData v_in)
{
VertData vert_out;
vert_out.pos = mul(float4(v_in.pos.xyz, 1.0), ViewProj);
vert_out.uv = v_in.uv;
return vert_out;
}
float4 PSDrawBare(VertData v_in) : TARGET
{
int center_x_percent = 50;
int center_y_percent = 50;
float power = -sharpness;
float2 uv_pixel_interval;
uv_pixel_interval.x = 1.0 / texture_width;
uv_pixel_interval.y = 1.0 / texture_height;
float2 center_pos = float2(center_x_percent * .01, center_y_percent * .01);
float2 uv = v_in.uv;
float b;
if (uv_pixel_interval.x < uv_pixel_interval.y){
b = center_pos.x;
} else {
b = center_pos.y;
}
uv = center_pos + normalize(v_in.uv - center_pos) * atan(distance(center_pos, v_in.uv) * -power * 10.0) * b / atan(-power * b * 10.0);
return image.Sample(def_sampler, uv);
}
technique Draw
{
pass
{
vertex_shader = VSDefault(v_in);
pixel_shader = PSDrawBare(v_in);
}
}
Now the OBS Studio filter named Sharpness will start to act like "unfish" (the sharpness value now controls the amount of the distortion, 0.18 is OK for the image provided by the topic starter).
And keep copy of the original "sharpness.effect" just in case.