AcesTonemappingStage.js 565 B

123456789101112131415161718
  1. //This file is automatically rebuilt by the Cesium build process.
  2. export default "uniform sampler2D colorTexture;\n\
  3. varying vec2 v_textureCoordinates;\n\
  4. #ifdef AUTO_EXPOSURE\n\
  5. uniform sampler2D autoExposure;\n\
  6. #endif\n\
  7. void main()\n\
  8. {\n\
  9. vec4 fragmentColor = texture2D(colorTexture, v_textureCoordinates);\n\
  10. vec3 color = fragmentColor.rgb;\n\
  11. #ifdef AUTO_EXPOSURE\n\
  12. color /= texture2D(autoExposure, vec2(0.5)).r;\n\
  13. #endif\n\
  14. color = czm_acesTonemapping(color);\n\
  15. color = czm_inverseGamma(color);\n\
  16. gl_FragColor = vec4(color, fragmentColor.a);\n\
  17. }\n\
  18. ";