Vector3DTilePolylinesVS.glsl 638 B

12345678910111213141516171819202122
  1. in vec4 currentPosition;
  2. in vec4 previousPosition;
  3. in vec4 nextPosition;
  4. in vec2 expandAndWidth;
  5. in float a_batchId;
  6. uniform mat4 u_modifiedModelView;
  7. void main()
  8. {
  9. float expandDir = expandAndWidth.x;
  10. float width = abs(expandAndWidth.y) + 0.5;
  11. bool usePrev = expandAndWidth.y < 0.0;
  12. vec4 p = u_modifiedModelView * currentPosition;
  13. vec4 prev = u_modifiedModelView * previousPosition;
  14. vec4 next = u_modifiedModelView * nextPosition;
  15. float angle;
  16. vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);
  17. gl_Position = czm_viewportOrthographic * positionWC;
  18. }