summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-fs-max-array-access-function.shader_test
blob: f3d8201669b55e0c52cad8dc94d03692325e4422 (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
[require]
GLSL >= 1.10

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

[fragment shader]
uniform float a[3];

float func(float array[3])
{
	return array[2];
}

void main()
{
	gl_FragColor = vec4(func(a), vec3(1.0));
}

[test]
uniform float a[0] 0.25
uniform float a[1] 0.5
uniform float a[2] 0.75
draw rect -1 -1 2 2
probe all rgba 0.75 1.0 1.0 1.0