]> git.tdb.fi Git - libs/gl.git/blob - tests/glsl/matrix_from_elements.glsl
Fix GLSL test cases so they pass the basic tests
[libs/gl.git] / tests / glsl / matrix_from_elements.glsl
1 uniform Transform
2 {
3         vec3 translation;
4         float rotation;
5 };
6
7 #pragma MSP stage(vertex)
8 layout(location=0) in vec2 position;
9 void main()
10 {
11         float c = cos(rotation);
12         float s = sin(rotation);
13         mat3 m = mat3(c, s, 0.0, -s, c, 0.0, translation);
14         gl_Position = vec4((m*vec3(position, 1.0)).xy, 0.0, 1.0);
15 }
16
17 // Target API: Vulkan
18
19 /* Expected output: vertex
20 layout(set=0, binding=24) uniform Transform
21 {
22         vec3 translation;
23         float rotation;
24 };
25 layout(location=0) in vec2 position;
26 void main()
27 {
28         float c = cos(rotation);
29         float s = sin(rotation);
30
31         gl_Position = vec4((mat3(vec3(c, s, 0.0), vec3(-s, c, 0.0), translation)*vec3(position, 1.0)).xy, 0.0, 1.0);
32 }
33 */