blob: f08aa5f1122614df898c2236a28d724a9308261a (
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
36
37
38
39
40
41
|
# Fill the window with red, then green, then blue.
[require]
GL ES >= 3.0
GLSL ES >= 3.00
[vertex shader]
in vec4 vertex;
void main() {
gl_Position = vertex;
}
[fragment shader]
precision highp float;
uniform vec4 u_color;
out vec4 color;
void main() {
color = u_color;
}
[vertex data]
vertex/float/2
-1.0 -1.0
1.0 -1.0
1.0 1.0
-1.0 1.0
[test]
uniform vec4 u_color 1.0 0.0 0.0 1.0
draw arrays GL_TRIANGLE_FAN 0 4
probe all rgba 1.0 0.0 0.0 1.0
uniform vec4 u_color 0.0 1.0 0.0 1.0
draw arrays GL_TRIANGLE_FAN 0 4
probe all rgba 0.0 1.0 0.0 1.0
uniform vec4 u_color 0.0 0.0 1.0 1.0
draw arrays GL_TRIANGLE_FAN 0 4
probe all rgba 0.0 0.0 1.0 1.0
|