About skew implementation on gui?


I’m trying to use vertex fragment to skew a gui component. When previewing it on the editor, the component is successfully skewed. But when running it, it doesn’t work

Here is the simple glsl code of the fragment shader

uniform highp mat4 view_proj;

// positions are in world space
attribute mediump vec3 position;
attribute mediump vec2 texcoord0;
attribute lowp vec4 color;

varying mediump vec2 var_texcoord0;
varying lowp vec4 var_color;

void main()
    var_texcoord0 = texcoord0;
    var_color = vec4(color.rgb * color.a, color.a);
    vec3 pos = position;
    if (pos.x > 0.5) {
      pos.y = pos.y * 0.8;
    } else {
      pos.y = pos.y * 1.2;
    gl_Position = view_proj * vec4(pos.xyz, 1.0);

I’m confused with what is the value of the variable position. Is it the screen position of the gui node or is it the position of node relative of the parent

Thank you for the help