summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-vs-mat-div-1.shader_test
blob: 6c361c2978b0c7fa5d20b6274b41c8d0f5cb9691 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[require]
GLSL >= 1.10

[vertex shader]
uniform vec3 arg0;
varying mat3 mat;

void main()
{
	gl_Position = gl_Vertex;

	mat3 m1 = mat3(0.0,        arg0.x, 0.0,
		       arg0.y,     0.0,    arg0.x,
		       0.0,        0.0,    arg0.z);
	mat3 m2 = mat3(2.0, 2.0, 1.0,
		       2.0, 1.0, 2.0,
		       2.0, 2.0, 10.0);

	mat = m1 / m2;
}

[fragment shader]
uniform vec3 arg1;
varying mat3 mat;

void main()
{
	gl_FragColor = vec4(mat * arg1.xyz, 0.0);
}

[test]
uniform vec3 arg0 1.0 1.0 1.0
uniform vec3 arg1 1.6 0.4 1.0
draw rect -1 -1 2 2
probe rgba 1 1 0.2 0.8 0.3 0.0