PolylineGlowMaterial.js 652 B

1234567891011121314151617181920212223
  1. //This file is automatically rebuilt by the Cesium build process.
  2. /*global define*/
  3. define(function() {
  4. "use strict";
  5. return "uniform vec4 color;\n\
  6. uniform float glowPower;\n\
  7. \n\
  8. varying float v_width;\n\
  9. \n\
  10. czm_material czm_getMaterial(czm_materialInput materialInput)\n\
  11. {\n\
  12. czm_material material = czm_getDefaultMaterial(materialInput);\n\
  13. \n\
  14. vec2 st = materialInput.st;\n\
  15. float glow = glowPower / abs(st.t - 0.5) - (glowPower / 0.5);\n\
  16. \n\
  17. material.emission = max(vec3(glow - 1.0 + color.rgb), color.rgb);\n\
  18. material.alpha = clamp(0.0, 1.0, glow) * color.a;\n\
  19. \n\
  20. return material;\n\
  21. }\n\
  22. ";
  23. });