ConvertLDRToDisplayPS.hlsl 821 B

123456789101112131415161718192021222324252627282930
  1. // RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
  2. // CHECK: textureLoad
  3. // CHECK: Log
  4. // CHECK: Exp
  5. //
  6. // Copyright (c) Microsoft. All rights reserved.
  7. // This code is licensed under the MIT License (MIT).
  8. // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
  9. // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
  10. // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
  11. // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
  12. //
  13. // Developed by Minigraph
  14. //
  15. // Author: James Stanard
  16. //
  17. #include "ShaderUtility.hlsli"
  18. #include "PresentRS.hlsli"
  19. Texture2D<float3> ColorTex : register(t0);
  20. [RootSignature(Present_RootSig)]
  21. float3 main( float4 position : SV_Position ) : SV_Target0
  22. {
  23. float3 LinearRGB = LinearizeColor(ColorTex[(int2)position.xy], LDR_COLOR_FORMAT);
  24. return ApplyColorProfile(LinearRGB, DISPLAY_PLANE_FORMAT);
  25. }