PolylineMaterialAppearanceVS.js 1000 B

12345678910111213141516171819202122232425262728293031323334
  1. //This file is automatically rebuilt by the Cesium build process.
  2. /*global define*/
  3. define(function() {
  4. "use strict";
  5. return "attribute vec3 position3DHigh;\n\
  6. attribute vec3 position3DLow;\n\
  7. attribute vec3 prevPosition3DHigh;\n\
  8. attribute vec3 prevPosition3DLow;\n\
  9. attribute vec3 nextPosition3DHigh;\n\
  10. attribute vec3 nextPosition3DLow;\n\
  11. attribute vec2 expandAndWidth;\n\
  12. attribute vec2 st;\n\
  13. \n\
  14. varying float v_width;\n\
  15. varying vec2 v_st;\n\
  16. \n\
  17. void main() \n\
  18. {\n\
  19. float expandDir = expandAndWidth.x;\n\
  20. float width = abs(expandAndWidth.y) + 0.5;\n\
  21. bool usePrev = expandAndWidth.y < 0.0;\n\
  22. \n\
  23. vec4 p = czm_computePosition();\n\
  24. vec4 prev = czm_computePrevPosition();\n\
  25. vec4 next = czm_computeNextPosition();\n\
  26. \n\
  27. v_width = width;\n\
  28. v_st = st;\n\
  29. \n\
  30. vec4 positionWC = getPolylineWindowCoordinates(p, prev, next, expandDir, width, usePrev);\n\
  31. gl_Position = czm_viewportOrthographic * positionWC;\n\
  32. }\n\
  33. ";
  34. });