blob: c07d0083de478bc3f34944651dbef2399047e00d (
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]
/* Tests a bug in copy propagation that turns
* e.g. { a = v.x; v.x = v.y; v.y = a } into { v.x = v.y; v.y = v.x; }
*/
varying vec4 colour;
void main()
{
gl_Position = ftransform();
colour = vec4(0.0, 1.0, 0.0, 1.0);
}
[fragment shader]
varying vec4 colour;
void main()
{
vec4 col = colour;
while (col.b < 0.6) { /* prevent direct propagation of input */
float r = col.r;
col.r = col.g;
col.g = r;
col.b += 0.25;
}
gl_FragColor = col;
}
[test]
clear color 0.5 0.5 0.5 1.0
clear
draw rect -1 -1 2 2
probe rgb 1 1 1.0 0.0 0.75
|