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

PrimitiveGaussianSplatFS.js 775B

1234567891011121314151617181920
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "//\n\
  3. // Fragment shader for Gaussian splats.\n\
  4. // Renders a Gaussian splat within a quad, discarding fragments outside the unit circle.\n\
  5. // Applies an approximate Gaussian falloff based on distance from the center and outputs\n\
  6. // a color modulated by the alpha and Gaussian weight.\n\
  7. //\n\
  8. void main() {\n\
  9. if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;\n\
  10. if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;\n\
  11. \n\
  12. float A = -dot(v_vertPos, v_vertPos);\n\
  13. if (A < -4.) {\n\
  14. discard;\n\
  15. }\n\
  16. \n\
  17. float B = exp(A * 4.) * v_splatColor.a ;\n\
  18. out_FragColor = vec4(v_splatColor.rgb * B , B);\n\
  19. }\n\
  20. ";