Vector3DTilePolylinesVS.js 824 B

123456789101112131415161718192021222324
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "attribute vec4 currentPosition;\n\
  3. attribute vec4 previousPosition;\n\
  4. attribute vec4 nextPosition;\n\
  5. attribute vec2 expandAndWidth;\n\
  6. attribute float a_batchId;\n\
  7. \n\
  8. uniform mat4 u_modifiedModelView;\n\
  9. \n\
  10. void main()\n\
  11. {\n\
  12. float expandDir = expandAndWidth.x;\n\
  13. float width = abs(expandAndWidth.y) + 0.5;\n\
  14. bool usePrev = expandAndWidth.y < 0.0;\n\
  15. \n\
  16. vec4 p = u_modifiedModelView * currentPosition;\n\
  17. vec4 prev = u_modifiedModelView * previousPosition;\n\
  18. vec4 next = u_modifiedModelView * nextPosition;\n\
  19. \n\
  20. float angle;\n\
  21. vec4 positionWC = getPolylineWindowCoordinatesEC(p, prev, next, expandDir, width, usePrev, angle);\n\
  22. gl_Position = czm_viewportOrthographic * positionWC;\n\
  23. }\n\
  24. ";