debug draw fix

This commit is contained in:
2023-05-26 02:55:55 +00:00
parent 9045f435a0
commit 8172620214
10 changed files with 182 additions and 194 deletions

View File

@@ -3,6 +3,7 @@ out vec4 color;
in float dist;
in vec4 fcolor;
in float seg_speed;
in float seg_len;
float pat = 0.5;
@@ -16,7 +17,7 @@ void main()
color = fcolor;
if (seg_len == 0) return;
if (mod(dist+time*seg_len,seg_len)/seg_len < 0.5)
if (mod(dist+(time*seg_speed)*seg_len,seg_len)/seg_len < 0.5)
discard;
/*
int d = int(dist);

View File

@@ -3,10 +3,12 @@ layout (location = 0) in vec2 apos;
layout (location = 1) in float adist;
layout (location = 2) in vec4 acolor;
layout (location = 3) in float aseglen;
layout (location = 4) in float asegspeed;
out float dist;
out vec4 fcolor;
out float seg_len;
out float seg_speed;
uniform mat4 proj;
@@ -16,4 +18,5 @@ void main()
fcolor = acolor;
dist = adist;
seg_len = aseglen;
seg_speed = asegspeed;
}