summaryrefslogtreecommitdiff
path: root/tests/shaders/glsl-const-initializer-03.shader_test
blob: a3bbd39c14c3053478fe3a1a61a013796596b43d (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
[require]
GLSL >= 1.10

[fragment shader]
uniform float a;
uniform float b;
void main(void)
{
	struct S {
		float a;
		float b;
		float c;
		float d;
	} s = S(0.5, 0.5, 0.5, 0.5);

	s.a = s.a + a;
	s.a = s.a - b;
	gl_FragColor = vec4(s.a, s.b, s.c, s.d);
}

[test]
uniform float a 0.3
uniform float b 0.3
draw rect -1 -1 2 2
probe all rgba 0.5 0.5 0.5 0.5