1 /* The ARB_shading_language_420pack suggests:
3 * Verify that the following three matrices are identical:
5 * mat2x2 a = mat2( vec2( 1.0, 0.0 ), vec2( 0.0, 1.0 ) );
6 * mat2x2 b = { vec2( 1.0, 0.0 ), vec2( 0.0, 1.0 ) };
7 * mat2x2 c = { { 1.0, 0.0 }, { 0.0, 1.0 } };
9 * This test differs from aggregate-initializer-matrix.shader_test
10 * in that it includes one dynamic variable, to further test the
11 * compiler. Otherwise, the initializer is constant folded away.
12 * The matrices should still be identical.
17 GL_ARB_shading_language_420pack
20 #extension GL_ARB_shading_language_420pack: enable
27 mat2x2 a = mat2( vec2( 1.0, vertex.x ), vec2( 0.0, 1.0 ) );
28 mat2x2 b = { vec2( 1.0, vertex.x ), vec2( 0.0, 1.0 ) };
29 mat2x2 c = { { 1.0, vertex.x }, { 0.0, 1.0 } };
31 color = vec4(0.0, 1.0, 0.0, 1.0);
33 if (a.length() != b.length() || a.length() != c.length()) {
34 color = vec4(0.0, 0.0, 1.0, 1.0);
36 for (int i = 0; i < a.length(); i++) {
37 if (a[i] != b[i] || a[i] != c[i]) {
38 color = vec4(1.0, 0.0, 0.0, 1.0);
55 probe all rgba 0.0 1.0 0.0 1.0