PolylineMaterialAppearanceVS.js 1.0 KB

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