diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-20 12:05:53 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2024-01-20 15:08:43 +0000 |
commit | 7f852de673bb687c5721c6a74367278f8ba62f56 (patch) | |
tree | 40b4e903854f4457191af6a4bb28abfd18b69fc7 /gfx/gl/shaders/networkStraight.vs | |
parent | Update network with vertex array (diff) | |
download | ilt-7f852de673bb687c5721c6a74367278f8ba62f56.tar.bz2 ilt-7f852de673bb687c5721c6a74367278f8ba62f56.tar.xz ilt-7f852de673bb687c5721c6a74367278f8ba62f56.zip |
Implement complete network straight part shader
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)); } |