diff options
Diffstat (limited to 'gfx/gl/shaders/networkStraight.vs')
-rw-r--r-- | gfx/gl/shaders/networkStraight.vs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gfx/gl/shaders/networkStraight.vs b/gfx/gl/shaders/networkStraight.vs index 025ae8f..a0fa437 100644 --- a/gfx/gl/shaders/networkStraight.vs +++ b/gfx/gl/shaders/networkStraight.vs @@ -5,7 +5,7 @@ layout(location = 1) in ivec3 v_bpos; layout(location = 2) in mat2 v_rot; layout(location = 4) in float v_reps; -uniform mat4 viewProjection; +uniform ivec3 viewPoint; flat out ivec3 apos; flat out ivec3 bpos; @@ -16,5 +16,9 @@ flat out float dist; void main() { - dist = viewProjection[0][0]; + apos = v_apos; + bpos = v_bpos; + rot = v_rot; + reps = v_reps; + dist = min(distance(viewPoint, v_apos), distance(viewPoint, v_bpos)); } |