Vector3DTilePolylinesVS.glsl 742 B

1234567891011121314151617181920212223242526
  1. attribute vec4 currentPosition;
  2. attribute vec4 previousPosition;
  3. attribute vec4 nextPosition;
  4. attribute vec2 expandAndWidth;
  5. attribute 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. #ifdef LOG_DEPTH
  19. czm_vertexLogDepth(czm_projection * p);
  20. #endif
  21. }