blob: 6d7706a373d550304656aa13138c68069299be57 (
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
[vertex shader]
varying vec3 color;
void main()
{
/* Test the constant expression handling of cross(). */
const vec3 arg0 = vec3(0.0, 0.0, 1.0);
const vec3 arg1 = vec3(1.0, 0.0, 0.0);
gl_Position = gl_Vertex;
color = cross(arg0, arg1);
}
[fragment shader]
varying vec3 color;
void main()
{
gl_FragColor = vec4(color, 0.0);
}
[test]
draw rect -1 -1 2 2
probe rgba 1 1 0.0 1.0 0.0 0.0
|