File: matrixError.vert

package info (click to toggle)
glslang 12.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 44,024 kB
  • sloc: cpp: 86,646; yacc: 4,020; sh: 630; python: 295; javascript: 74; ansic: 19; makefile: 14
file content (24 lines) | stat: -rw-r--r-- 651 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#version 120

attribute vec3 v3;

uniform mat3x2 m32;

const mat2x4 m24 = mat2x4(1.0, 2.0, 
                          3.0, 4.0,
                          3.0, 4.0,
                          3.0, 4.0, 5.0);          // ERROR, too many arguments

void main()
{
    mat2x3 m23;
    vec3 a, b;

    a = v3 * m23;      // ERROR, type mismatch
    b = m32 * v3;      // ERROR, type mismatch
    m23.xy;            // ERROR, can't use .

    gl_Position = vec4(m23 * m32 * v3, m24[2][4]);  // ERROR, 2 and 4 are out of range
    m23 *= m23;        // ERROR, right side needs to be square
    m23 *= m32;        // ERROR, left columns must match right rows
}