PixelShader.hlsl 799 B

123456789101112131415161718192021222324
  1. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  2. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  3. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  4. // PARTICULAR PURPOSE.
  5. //
  6. // Copyright (c) Microsoft Corporation. All rights reserved
  7. //----------------------------------------------------------------------
  8. Texture2D tx : register( t0 );
  9. SamplerState samLinear : register( s0 );
  10. struct PS_INPUT
  11. {
  12. float4 Pos : SV_POSITION;
  13. float2 Tex : TEXCOORD;
  14. };
  15. //--------------------------------------------------------------------------------------
  16. // Pixel Shader
  17. //--------------------------------------------------------------------------------------
  18. float4 PS(PS_INPUT input) : SV_Target
  19. {
  20. return tx.Sample( samLinear, input.Tex );
  21. }