I tried to adaptive the Sprite specific shader to the GUI shader, but the problem is that there is some difference between the local position attribute, which I defined the same everywhere.
I have to show that the UV coordinates of the texture do not differ (the code is the same in the gui and in the sprite shader):
void main()
{
gl_FragColor = vec4(var_texcoord0.xy, 0.0, 1.0);
}
but when i try to use local position attribute then i have big difference (the code is the same in the gui and in the sprite shader):
void main()
{
gl_FragColor = vec4(var_position_local.xy, 0.0, 1.0);
}
What is this difference and how do I get the true local position attribute for GUI?
project example:
diff_gui_go_shader.zip (43.5 KB)