BilinearUpsamplePS.hlsl 903 B

12345678910111213141516171819202122232425262728293031
  1. // RUN: %dxc -E main -T ps_6_0 -O0 %s | FileCheck %s
  2. // CHECK: sampleLevel
  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. #include "ShaderUtility.hlsli"
  17. #include "PresentRS.hlsli"
  18. Texture2D<float3> ColorTex : register(t0);
  19. SamplerState BilinearFilter : register(s0);
  20. [RootSignature(Present_RootSig)]
  21. float3 main( float4 position : SV_Position, float2 uv : TexCoord0 ) : SV_Target0
  22. {
  23. float3 LinearRGB = LinearizeColor(ColorTex.SampleLevel(BilinearFilter, uv, 0), LDR_COLOR_FORMAT);
  24. return ApplyColorProfile(LinearRGB, DISPLAY_PLANE_FORMAT);
  25. }