CommonPostFX.fxh 683 B

12345678910111213141516171819202122232425262728
  1. //////////////////////////////////////////////////////////////////////////////
  2. // ©2008 Electronic Arts Inc
  3. //
  4. // Common header for PostFX shaders
  5. //////////////////////////////////////////////////////////////////////////////
  6. #ifndef _COMMON_POST_FX_FXH_
  7. #define _COMMON_POST_FX_FXH_
  8. #define XENON_HDR_RESOLVE_FACTOR 8
  9. bool IsHdrEnabled
  10. <
  11. string SasBindAddress = "WW3D.IsHdrEnabled";
  12. > = false;
  13. // Compensate for the intensity decrease from the conversion fp12 to fixed16 on Xenon HDR RTs
  14. float3 UncompressRenderTargetColor(float3 color)
  15. {
  16. #if defined(EA_PLATFORM_XENON)
  17. if (IsHdrEnabled)
  18. color *= XENON_HDR_RESOLVE_FACTOR;
  19. #endif
  20. return color;
  21. }
  22. #endif // Include guard