Hello I am trying to get a fast rounded rectangle glsl shader but I've only managed to do it for a filled rectangle using this function (https://github.com/marklundin/glsl-sdf-primitives/blob/master/udRoundBox.glsl):
float udRoundBox( vec3 p, vec3 b, float r )
{
return length(max(abs(p)-b,0.0))-r;
}
I've been trying to find a version of this that does a border rather than a fill, even tried to come up with one, but no luck. Does anyone have a solution to this?