~mmach/netext73/glslang

« back to all changes in this revision

Viewing changes to Test/nonSquare.vert

  • Committer: mmach
  • Date: 2020-02-05 18:22:02 UTC
  • Revision ID: netbit73@gmail.com-20200205182202-x6mj2xsqo1ngs0kq
8.13

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#version 120
 
2
 
 
3
attribute vec3 v3;
 
4
attribute vec4 v4;
 
5
 
 
6
uniform mat3x2 m32;
 
7
 
 
8
const vec2 cv2 = vec2(10.0, 20.0);
 
9
const mat2x4 m24 = mat2x4(3.0);
 
10
const mat4x2 m42 = mat4x2(1.0, 2.0, 
 
11
                          3.0, 4.0,
 
12
                          5.0, 6.0, 
 
13
                          7.0, 8.0);
 
14
 
 
15
void main()
 
16
{
 
17
    mat2x3 m23;
 
18
    vec2 a, b;
 
19
 
 
20
    a = v3 * m23;
 
21
    b = m32 * v3;
 
22
 
 
23
    gl_Position = vec4(m23 * m32 * v3, m24[1][3]) + 
 
24
                  (m24 * m42) * v4 + cv2 * m42 + m24 * cv2 + vec4(cv2[1], cv2.x, m42[2][1], m42[2][0]);
 
25
}