智慧水务管理系统 - 精河县供水工程综合管理平台

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "#ifdef USE_FLOAT64\n\
  3. in vec3 positionHigh;\n\
  4. in vec3 positionLow;\n\
  5. in vec3 prevPositionHigh;\n\
  6. in vec3 prevPositionLow;\n\
  7. in vec3 nextPositionHigh;\n\
  8. in vec3 nextPositionLow;\n\
  9. #else\n\
  10. in vec3 position;\n\
  11. in vec3 prevPosition;\n\
  12. in vec3 nextPosition;\n\
  13. #endif\n\
  14. in vec4 pickColor;\n\
  15. in vec4 showColorWidthAndTexCoord;\n\
  16. in float alpha;\n\
  17. \n\
  18. out vec4 v_pickColor;\n\
  19. out vec4 v_color;\n\
  20. out vec2 v_st;\n\
  21. out float v_width;\n\
  22. out float v_polylineAngle;\n\
  23. \n\
  24. void main()\n\
  25. {\n\
  26. float show = showColorWidthAndTexCoord.x;\n\
  27. vec4 color = czm_decodeRGB8(showColorWidthAndTexCoord.y);\n\
  28. float width = showColorWidthAndTexCoord.z;\n\
  29. float texCoord = showColorWidthAndTexCoord.w;\n\
  30. \n\
  31. ///////////////////////////////////////////////////////////////////////////\n\
  32. \n\
  33. bool usePrevious = texCoord == 1.0;\n\
  34. float expandDir = gl_VertexID % 2 == 1 ? 1.0 : -1.0;\n\
  35. float polylineAngle;\n\
  36. \n\
  37. #ifdef USE_FLOAT64\n\
  38. vec4 positionEC = czm_translateRelativeToEye(positionHigh, positionLow);\n\
  39. vec4 prevPositionEC = czm_translateRelativeToEye(prevPositionHigh, prevPositionLow);\n\
  40. vec4 nextPositionEC = czm_translateRelativeToEye(nextPositionHigh, nextPositionLow);\n\
  41. vec4 positionWC = getPolylineWindowCoordinates(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);\n\
  42. #else\n\
  43. vec4 positionEC = czm_modelView * vec4(position, 1.0);\n\
  44. vec4 prevPositionEC = czm_modelView * vec4(prevPosition, 1.0);\n\
  45. vec4 nextPositionEC = czm_modelView * vec4(nextPosition, 1.0);\n\
  46. // Positions are already in eye space; use the EC variant to skip the redundant transform.\n\
  47. vec4 positionWC = getPolylineWindowCoordinatesEC(positionEC, prevPositionEC, nextPositionEC, expandDir, width, usePrevious, polylineAngle);\n\
  48. #endif\n\
  49. \n\
  50. ///////////////////////////////////////////////////////////////////////////\n\
  51. \n\
  52. gl_Position = czm_viewportOrthographic * positionWC * show;\n\
  53. \n\
  54. v_pickColor = pickColor / 255.0;\n\
  55. \n\
  56. v_color = color;\n\
  57. v_color.a *= alpha / 255.0 * show;\n\
  58. \n\
  59. v_st.s = texCoord;\n\
  60. v_st.t = czm_writeNonPerspective(clamp(expandDir, 0.0, 1.0), gl_Position.w);\n\
  61. \n\
  62. v_width = width;\n\
  63. v_polylineAngle = polylineAngle;\n\
  64. }\n\
  65. ";