BillboardCollectionFS.js 750 B

1234567891011121314151617181920212223242526272829303132333435
  1. //This file is automatically rebuilt by the Cesium build process.
  2. /*global define*/
  3. define(function() {
  4. "use strict";
  5. return "uniform sampler2D u_atlas;\n\
  6. \n\
  7. varying vec2 v_textureCoordinates;\n\
  8. \n\
  9. #ifdef RENDER_FOR_PICK\n\
  10. varying vec4 v_pickColor;\n\
  11. #else\n\
  12. varying vec4 v_color;\n\
  13. #endif\n\
  14. \n\
  15. void main()\n\
  16. {\n\
  17. #ifdef RENDER_FOR_PICK\n\
  18. vec4 vertexColor = vec4(1.0, 1.0, 1.0, 1.0);\n\
  19. #else\n\
  20. vec4 vertexColor = v_color;\n\
  21. #endif\n\
  22. \n\
  23. vec4 color = texture2D(u_atlas, v_textureCoordinates) * vertexColor;\n\
  24. if (color.a == 0.0)\n\
  25. {\n\
  26. discard;\n\
  27. }\n\
  28. \n\
  29. #ifdef RENDER_FOR_PICK\n\
  30. gl_FragColor = v_pickColor;\n\
  31. #else\n\
  32. gl_FragColor = color;\n\
  33. #endif\n\
  34. }";
  35. });