GlobeFSDepth.js 675 B

12345678910111213141516171819202122232425
  1. //This file is automatically rebuilt by the Cesium build process.
  2. /*global define*/
  3. define(function() {
  4. "use strict";
  5. return "varying vec4 positionEC;\n\
  6. \n\
  7. void main()\n\
  8. {\n\
  9. // TODO: make arbitrary ellipsoid\n\
  10. czm_ellipsoid ellipsoid = czm_getWgs84EllipsoidEC();\n\
  11. \n\
  12. vec3 direction = normalize(positionEC.xyz);\n\
  13. czm_ray ray = czm_ray(vec3(0.0), direction);\n\
  14. \n\
  15. czm_raySegment intersection = czm_rayEllipsoidIntersectionInterval(ray, ellipsoid);\n\
  16. if (!czm_isEmpty(intersection))\n\
  17. {\n\
  18. gl_FragColor = vec4(1.0, 1.0, 0.0, 1.0);\n\
  19. }\n\
  20. else\n\
  21. {\n\
  22. discard;\n\
  23. }\n\
  24. }";
  25. });