wedge/shaders/cell.frag

21 lines
532 B
GLSL
Raw Normal View History

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-07-27 19:43:29 +00:00
outcolor = 0.2 * (bot * (1 - pos.y) + top * (1 - pos.x)) + 0.2;
// 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
}