float circle(in vec2 st, in float r, in float blur){
float d = distance(st, vec2(.5));
float t = smoothstep(r,r+blur,d);;
return t;
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
// Normalized pixel coordinates (from 0 to 1)
vec2 uv = fragCoord.xy/iResolution.xy;
uv.x *= iResolution.x/iResolution.y;
//uv.x -= .5;
vec3 col = vec3(0.);
col = vec3(circle(uv, .2, 0.01));
// Output to screen
fragColor = vec4(col,1.0);
}
原创文章,作者:306829225,如若转载,请注明出处:https://blog.ytso.com/270134.html