2022-06-21 23:16:14 -05:00
|
|
|
#version 330
|
|
|
|
out vec4 color;
|
|
|
|
|
2023-05-16 13:31:19 -05:00
|
|
|
in float dist;
|
|
|
|
in vec4 fcolor;
|
|
|
|
|
|
|
|
in float seg_len;
|
|
|
|
float pat = 0.5;
|
|
|
|
|
|
|
|
int pp = 0x0C24;
|
2023-01-16 02:16:39 -06:00
|
|
|
|
2023-05-24 20:45:50 -05:00
|
|
|
uniform float time;
|
|
|
|
|
2022-06-21 23:16:14 -05:00
|
|
|
void main()
|
|
|
|
{
|
2023-05-16 13:31:19 -05:00
|
|
|
color = fcolor;
|
2023-05-24 20:45:50 -05:00
|
|
|
if (seg_len == 0) return;
|
|
|
|
|
|
|
|
if (mod(dist+time*seg_len,seg_len)/seg_len < 0.5)
|
2023-05-16 13:31:19 -05:00
|
|
|
discard;
|
|
|
|
/*
|
|
|
|
int d = int(dist);
|
|
|
|
|
|
|
|
if (pp * mod((d / 20), 16) == 0)
|
|
|
|
discard;
|
|
|
|
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
|
|
|
|
float patrn = 16 * mod(dist,seg_len)/seg_len;
|
|
|
|
|
|
|
|
if (patrn < 8)
|
|
|
|
discard;
|
|
|
|
*/
|
2023-05-12 13:22:05 -05:00
|
|
|
}
|