3 #pragma MSP stage(vertex)
4 layout(location=0) in vec4 position;
7 vec4 c0 = mvp[0]*position;
8 vec4 c1 = mvp[1]*position;
9 vec4 c2 = mvp[2]*position;
10 vec4 c3 = mvp[3]*position;
12 clip_pos.x = c0.x+c1.x+c2.x+c3.x;
13 clip_pos.y = c0.y+c1.y+c2.y+c3.y;
14 clip_pos.z = c0.z+c1.z+c2.z+c3.z;
15 clip_pos.w = c0.w+c1.w+c2.w+c3.w;
16 gl_Position = vec4(clip_pos.xy, 0.0, 1.0);
19 /* Expected output: vertex
20 layout(location=0) uniform mat4 mvp;
21 layout(location=0) in vec4 position;
24 vec4 c0 = mvp[0]*position;
25 vec4 c1 = mvp[1]*position;
26 vec4 c2 = mvp[2]*position;
27 vec4 c3 = mvp[3]*position;
29 clip_pos.x = c0.x+c1.x+c2.x+c3.x;
30 clip_pos.y = c0.y+c1.y+c2.y+c3.y;
31 gl_Position = vec4(clip_pos.xy, 0.0, 1.0);