debug draw fix
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user