TonemappingResources.glsl 719 B

1234567891011121314151617181920212223242526
  1. // Copyright (C) 2009-2020, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. // Tonemapping resources
  6. #pragma once
  7. #include <shaders/Common.glsl>
  8. #ifndef TONEMAPPING_RESOURCE_AS_BUFFER
  9. # define TONEMAPPING_RESOURCE_AS_BUFFER 0
  10. #endif
  11. #if TONEMAPPING_RESOURCE_AS_BUFFER
  12. layout(std140, set = TONEMAPPING_SET, binding = TONEMAPPING_BINDING) buffer tmss0_
  13. #else
  14. layout(std140, set = TONEMAPPING_SET, binding = TONEMAPPING_BINDING) uniform tmu0_
  15. #endif
  16. {
  17. Vec4 u_averageLuminanceExposurePad2;
  18. };
  19. #define u_averageLuminance u_averageLuminanceExposurePad2.x
  20. #define u_exposureThreshold0 u_averageLuminanceExposurePad2.y