output-standard.chunk 458 B

1234567891011121314151617
  1. // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
  2. #include <common/color/aces>
  3. #include <common/color/gamma>
  4. #include <common/data/unpack>
  5. vec4 CCFragOutput (vec4 color) {
  6. #if CC_USE_RGBE_OUTPUT
  7. color = packRGBE(color.rgb);
  8. #elif !CC_USE_FLOAT_OUTPUT
  9. #if CC_USE_HDR && CC_TONE_MAPPING_TYPE == HDR_TONE_MAPPING_ACES
  10. color.rgb = ACESToneMap(color.rgb);
  11. #endif
  12. color.rgb = LinearToSRGB(color.rgb);
  13. #endif
  14. return color;
  15. }