summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-fs-struct-notequal.shader_test
blob: e373de22c2345c184764a1e656ca530af678ce3b (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
[require]
GLSL >= 1.20

[vertex shader]
void main()
{
   gl_Position = gl_Vertex;
}

[fragment shader]
struct S {
       vec4 v1, v2;
};

uniform S s;

void main()
{
	S s1 = S(vec4(1.0, 2.0, 3.0, 4.0), vec4(5.0, 6.0, 7.0, 8.0));
	S s2 = S(vec4(1.0, 2.0, 3.0, 4.0), vec4(5.0, 1.0, 1.0, 8.0));

	gl_FragColor = vec4(s1 != s, s2 != s, 0.0, 0.0);
}

[test]
uniform vec4 s.v1 1.0 2.0 3.0 4.0
uniform vec4 s.v2 5.0 6.0 7.0 8.0
draw rect -1 -1 2 2
probe all rgba 0.0 1.0 0.0 0.0