OSDN Git Service

[Qt][OpenGL][WIP] GL4.3: Implementing texture buffer with mapping.
[csp-qt/common_source_project-fm7.git] / source / src / qt / gui / gl4_3 / vertex_shader.glsl
1 //precision mediump float;
2 in mediump vec3 vertex;
3 in mediump vec2 texcoord;
4 out mediump vec2 v_texcoord;
5 out vec2 v_xy;
6 out float vertex_id;
7
8 uniform mat2 rotate_mat;
9 void main ()
10 {
11         vec2 xy = vertex.xy;
12         xy = rotate_mat * xy;
13         gl_Position = vec4(xy, vertex.z, 1.0);
14     v_texcoord = texcoord;
15         v_xy = vertex.xy;
16         vertex_id = float(gl_VertexID);
17 }
18