alphaWeight.js 529 B

12345678910111213
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "/**\n\
  3. * @private\n\
  4. */\n\
  5. float czm_alphaWeight(float a)\n\
  6. {\n\
  7. float z = (gl_FragCoord.z - czm_viewportTransformation[3][2]) / czm_viewportTransformation[2][2];\n\
  8. \n\
  9. // See Weighted Blended Order-Independent Transparency for examples of different weighting functions:\n\
  10. // http://jcgt.org/published/0002/02/09/\n\
  11. return pow(a + 0.01, 4.0) + max(1e-2, min(3.0 * 1e3, 0.003 / (1e-5 + pow(abs(z) / 200.0, 4.0))));\n\
  12. }\n\
  13. ";