Illumination shader on a 3D rotated primitive

Hi, i’ve been working on a Phong shader and tried to use it on a sphere, but when i rotate it, the shader is applied and then the mesh is transformed.

Before the rotation / After the rotation

However I want the light reflexion to use the provided ofNode position/rotation/scale

here’s the phong shader

// vertex shader
#version 330

#define MAX_LIGHTS 8

in vec4 position;
in vec4 normal;

in vec2 texcoord;

out vec3 surface_position;
out vec3 surface_normal;

out vec2 texCoordVarying;
out vec3 light_position[MAX_LIGHTS]; 

out int count;

uniform mat4x4 modelViewMatrix;
uniform mat4x4 projectionMatrix;

uniform mat4 textureMatrix;
uniform vec3 lightPos[MAX_LIGHTS];
uniform int nbLights;

void main()
{
  mat4x4 normalMatrix = transpose(inverse(modelViewMatrix));

  surface_normal = vec3(normalMatrix * normal);
  surface_position = vec3(modelViewMatrix * position);

  for(int i = 0; i < nbLights; i++){
    light_position[i] = vec3(modelViewMatrix * vec4(lightPos[i], 1.0));
  }
  count = nbLights;
  texCoordVarying = texcoord;
  gl_Position = projectionMatrix * modelViewMatrix * position;
}

// fragment shader
#version 330

#define MAX_LIGHTS 8

in vec3 surface_position;
in vec3 surface_normal;
in vec3 light_position[MAX_LIGHTS];

in vec2 texCoordVarying;

out vec4 fragment_color;

uniform vec3 color_ambient;
uniform vec3 color_diffuse;
uniform vec3 color_specular;
uniform int nbLights;
uniform int isTexturePresent = 0;

uniform sampler2D tex0;

uniform float brightness;

void main()
{
  vec3 cd = isTexturePresent * (color_diffuse * texture(tex0, texCoordVarying).rgb) + abs((isTexturePresent - 1) * color_diffuse);
  vec3 cs = isTexturePresent * (color_specular * texture(tex0, texCoordVarying).rgb) + abs((isTexturePresent - 1) * color_specular);

  vec3 n = normalize(surface_normal);
  vec3 v = normalize(-surface_position);

  vec4 colorSum = vec4(0);

  for(int i = 0; i < nbLights; i++) {
    vec3 l = normalize(light_position[i] - surface_position);
    
    float reflection_diffuse = max(dot(n, l), 0.0);
    float reflection_specular = 0.0;
    
    if (reflection_diffuse > 0.0)
    {
      vec3 r = reflect(-l, n);
      reflection_specular = pow(max(dot(v, r), 0.0), brightness);
    }

    colorSum += vec4(cd * reflection_diffuse + cs * reflection_specular, 0.0);
  }

  fragment_color = vec4(color_ambient, 1) + colorSum;
}

For the draw part, I simply draw the primitive (of3dPrimitive) and wrap it between the shader begin and end :
I also have a UI allowing me to modify the rotation of the primitive.

shader.begin();

// set the uniforms attributs 
...
primitive.draw();
shader.end();