If you know all that but want to do it in a fragment shader, this is a whole different story… you’d probably need to use the distance field of such line (a formula giving the distance from it) and then output pixels of the color of your choice when that distance is lower than some amount, which sounds quite involved for what you want to achieve.
Yes i am sure i want to use shaders because i’m trying to learn shader programming.
Found a bunch of examples about shader programming on shadertoy,but seems godot use a bit different shader code style and documentation about it is very poor i think.