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

BufferPointMaterialVS.js 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. #else\n\
  6. in vec3 position;\n\
  7. #endif\n\
  8. in vec4 pickColor;\n\
  9. in vec4 showPixelSizeColorAlpha;\n\
  10. in vec3 outlineWidthColorAlpha;\n\
  11. \n\
  12. out vec4 v_pickColor;\n\
  13. out vec4 v_color;\n\
  14. out vec4 v_outlineColor;\n\
  15. out float v_innerRadiusFrac;\n\
  16. \n\
  17. void main()\n\
  18. {\n\
  19. // Unpack attributes.\n\
  20. float show = showPixelSizeColorAlpha.x;\n\
  21. float pixelSize = showPixelSizeColorAlpha.y;\n\
  22. vec4 color = czm_decodeRGB8(showPixelSizeColorAlpha.z);\n\
  23. float alpha = showPixelSizeColorAlpha.w;\n\
  24. float outlineWidth = outlineWidthColorAlpha.x;\n\
  25. vec4 outlineColor = czm_decodeRGB8(outlineWidthColorAlpha.y);\n\
  26. float outlineAlpha = outlineWidthColorAlpha.z;\n\
  27. \n\
  28. ///////////////////////////////////////////////////////////////////////////\n\
  29. \n\
  30. float innerRadius = 0.5 * pixelSize * czm_pixelRatio;\n\
  31. float outerRadius = (0.5 * pixelSize + outlineWidth) * czm_pixelRatio;\n\
  32. \n\
  33. ///////////////////////////////////////////////////////////////////////////\n\
  34. \n\
  35. #ifdef USE_FLOAT64\n\
  36. vec4 p = czm_translateRelativeToEye(positionHigh, positionLow);\n\
  37. vec4 positionEC = czm_modelViewRelativeToEye * p;\n\
  38. #else\n\
  39. vec4 positionEC = czm_modelView * vec4(position, 1.0);\n\
  40. #endif\n\
  41. \n\
  42. ///////////////////////////////////////////////////////////////////////////\n\
  43. \n\
  44. gl_Position = czm_projection * positionEC;\n\
  45. czm_vertexLogDepth();\n\
  46. \n\
  47. v_pickColor = pickColor / 255.0;\n\
  48. \n\
  49. v_color = color;\n\
  50. v_color.a *= alpha * show;\n\
  51. \n\
  52. v_outlineColor = outlineColor;\n\
  53. v_outlineColor.a *= outlineAlpha * show;\n\
  54. \n\
  55. v_innerRadiusFrac = innerRadius / outerRadius;\n\
  56. \n\
  57. gl_PointSize = 2.0 * outerRadius * show;\n\
  58. gl_Position *= show;\n\
  59. }\n\
  60. ";