UIPixelShader.hlsl 1.4 KB

12345678910111213141516171819202122232425
  1. /////////////
  2. // GLOBALS //
  3. /////////////
  4. Texture2D shaderTexture;
  5. SamplerState SampleType;
  6. //////////////
  7. // TYPEDEFS //
  8. //////////////
  9. struct PixelInputType
  10. {
  11. float4 position : SV_POSITION;
  12. float2 tex : TEXCOORD0;
  13. };
  14. ////////////////////////////////////////////////////////////////////////////////
  15. // Pixel Shader
  16. ////////////////////////////////////////////////////////////////////////////////
  17. float4 TexturePixelShader( PixelInputType input ) : SV_TARGET
  18. {
  19. //return float4( 0.5, 0.5, 0.5, 0.5 );
  20. // Sample the pixel color from the texture using the sampler at this texture coordinate location.
  21. float4 textureColor = shaderTexture.Sample( SampleType, input.tex );
  22. return textureColor;
  23. }