DepthPlaneFS.js 541 B

12345678910111213141516171819
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "varying vec4 positionEC;\n\
  3. void main()\n\
  4. {\n\
  5. vec3 direction = normalize(positionEC.xyz);\n\
  6. czm_ray ray = czm_ray(vec3(0.0), direction);\n\
  7. vec3 ellipsoid_center = czm_view[3].xyz;\n\
  8. czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid_center, czm_ellipsoidInverseRadii);\n\
  9. if (!czm_isEmpty(intersection))\n\
  10. {\n\
  11. gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n\
  12. }\n\
  13. else\n\
  14. {\n\
  15. discard;\n\
  16. }\n\
  17. czm_writeLogDepth();\n\
  18. }\n\
  19. ";