Fill Shader

Hi, I’m trying to recreate shader that behaves like Fill Image in UI.

Here’s URP Unlit shader:

Basically, I’m almost successful considering that I’m not good at shaders.

But there’s a problem. I want to limit my output to alpha to be only either 0 or 1, because the result is grayscale which produces unwanted looks. So, Floor it is! No? Step? No? Look what it produces, that strange pink epilepsy.

Can somebody help me so this doesn’t happen?

Thanks!

Ok, I’ve managed to create radial fill shader