-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.glsl
More file actions
51 lines (44 loc) · 1019 Bytes
/
test.glsl
File metadata and controls
51 lines (44 loc) · 1019 Bytes
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
42
43
44
45
46
47
48
49
50
51
precision mediump float;
#pragma glslify: rectangularFunction = require(./)
bool test_1() {
float center = 0.5;
float width = 0.25;
float x = 0.2;
float y = rectangularFunction(x, center, width);
return y == 0.;
}
bool test_2() {
float center = 0.5;
float width = 0.25;
float x = 0.4;
float y = rectangularFunction(x, center, width);
return y == 1.;
}
bool test_3() {
float center = 0.5;
float width = 0.25;
float x = center - width / 2.;
float y = rectangularFunction(x, center, width);
return y == 1.;
}
bool test_4() {
float center = 0.5;
float width = 0.25;
float x = center + width / 2.;
float y = rectangularFunction(x, center, width);
return y == 1.;
}
bool test_5() {
float center = 0.5;
float width = 0.25;
float x = center + width / 2. + 0.01;
float y = rectangularFunction(x, center, width);
return y == 0.;
}
bool test_6() {
float center = 0.5;
float width = 0.25;
float x = center - width / 2. - 0.01;
float y = rectangularFunction(x, center, width);
return y == 0.;
}