2019-07-27 10:03:19 +00:00
|
|
|
#version 330
|
|
|
|
|
2019-07-27 19:43:29 +00:00
|
|
|
in vec4 pos;
|
|
|
|
out vec4 outcolor;
|
|
|
|
|
|
|
|
uniform vec4 color;
|
|
|
|
|
|
|
|
const float threshold = 0.05;
|
|
|
|
|
|
|
|
const vec4 top = vec4(0.5, 0.5, 0.5, 1.0);
|
|
|
|
const vec4 bot = vec4(0.4, 0.4, 0.4, 1.0);
|
2019-07-27 10:03:19 +00:00
|
|
|
|
|
|
|
void main() {
|
2019-08-06 08:16:06 +00:00
|
|
|
outcolor = vec4(0.2 * (0.4 * (1 - pos.y) + 0.5 * (1 - pos.x)) + 0.2);
|
|
|
|
outcolor.w = 1.0;
|
2019-07-27 19:43:29 +00:00
|
|
|
// if ((pos.x > -threshold && pos.x < threshold)
|
|
|
|
// || (pos.y > -threshold && pos.y < threshold)
|
|
|
|
// || (pos.x > 1.0-threshold && pos.x < 1.0+threshold)
|
|
|
|
// || (pos.y > 1.0-threshold && pos.y < 1.0+threshold)) {
|
|
|
|
// outcolor = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
|
// }
|
2019-07-27 10:03:19 +00:00
|
|
|
}
|