acesTonemapping.js 499 B

123456789101112131415161718
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "// See:\n\
  3. // https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/\n\
  4. \n\
  5. vec3 czm_acesTonemapping(vec3 color) {\n\
  6. float g = 0.985;\n\
  7. float a = 0.065;\n\
  8. float b = 0.0001;\n\
  9. float c = 0.433;\n\
  10. float d = 0.238;\n\
  11. \n\
  12. color = (color * (color + a) - b) / (color * (g * color + c) + d);\n\
  13. \n\
  14. color = clamp(color, 0.0, 1.0);\n\
  15. \n\
  16. return color;\n\
  17. }\n\
  18. ";