ISF - Masking - Vignette Spot
#define aspectRatio RENDERSIZE.x/RENDERSIZE.y
vec2 Position = vec2(center_x, center_y);
float circle(in vec2 center, in float lRadius, in float blur) {
float aspect = RENDERSIZE.x / RENDERSIZE.y;
vec2 pixel = isf_FragNormCoord.xy;
vec2 dist = pixel - center;
if (!keep_ratio) dist.y /= aspectRatio;
return 1.-smoothstep( lRadius - ( lRadius * blur ),
lRadius + ( lRadius * blur ),
dot( dist, dist ) * 4.0 );
}
void main() {
float mask = circle( Position, Radius, Softness );
vec4 color = IMG_NORM_PIXEL(inputImage, isf_FragNormCoord.xy);
color.a = mask;
gl_FragColor = color;
}