Changing shape position based on mouse coordinates

Hello, i am learning . GLSL and have a question how to change shape position on mouse move

Here is my shader:

varying vec3 v_position; //value default is 0,0,0
vec2 u_resolution;
vec2 u_mouse;

void main (void){

vec2 mouse = u_mouse/u_resolution;
float inCircle = 1.0 - step(0.2, length(v_position.xy-vec2(0.5,-0.5)));
vec3 color = vec3 (1.0,1.0,0.0) * inCircle;

gl_FragColor = vec4(color, 1.0);

if i am subtracting vec2 value from v_position i can manually manipulate position of my circle, but by somereason if i replace this vec2 with vec2 mouse it does not work.

Manually changing position works: v_position.xy-vec2(0.5,-0.5)
If i replace it with mouse vec2 does not work: v_position.xy-mouse

vec2 mouse is calculated by mouse position divided by resolution and it technically should output two values 0 to 1.

what i am doing wrong ? (my goal is to make yellow circle following mouse)

These should be uniforms. Use glUniform2f or glUniform2fv to set the values. Although typically you’d just have one variable containing the offset (in whatever coordinate system is appropriate) and calculate that in the client. There’s no point repeating the calculation for each vertex.