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
|
[require]
GLSL >= 1.10
[vertex shader]
varying vec4 color;
void main()
{
gl_Position = gl_Vertex;
color = vec4(gl_Vertex.xy, -gl_Vertex.xy);
}
[fragment shader]
varying vec4 color;
void main()
{
vec2 rg = abs(color.rg);
gl_FragColor = vec4(rg, 0.0, 1.0);
}
[test]
draw rect -1 -1 2 2
relative probe rgb (0.0, 0.0) (1.0, 1.0, 0.0)
relative probe rgb (0.1, 0.1) (0.8, 0.8, 0.0)
relative probe rgb (0.2, 0.2) (0.6, 0.6, 0.0)
relative probe rgb (0.3, 0.3) (0.4, 0.4, 0.0)
relative probe rgb (0.4, 0.4) (0.2, 0.2, 0.0)
relative probe rgb (0.5, 0.5) (0.0, 0.0, 0.0)
relative probe rgb (0.6, 0.6) (0.2, 0.2, 0.0)
relative probe rgb (0.7, 0.7) (0.4, 0.4, 0.0)
relative probe rgb (0.8, 0.8) (0.6, 0.6, 0.0)
relative probe rgb (0.9, 0.9) (0.8, 0.8, 0.0)
relative probe rgb (1.0, 1.0) (1.0, 1.0, 0.0)
|