UIPixelShader.hlsl 391 B

1234567891011121314151617181920212223
  1. Texture2D ShaderTexture : register(t2);
  2. SamplerState SampleType : register(s1);
  3. struct PS_INPUT
  4. {
  5. float4 Position : SV_POSITION;
  6. float2 Tex : TEXCOORD0;
  7. float4 Color : COLOR0;
  8. };
  9. struct PS_OUTPUT
  10. {
  11. float4 RGBColor : SV_TARGET;
  12. };
  13. PS_OUTPUT main(PS_INPUT In)
  14. {
  15. PS_OUTPUT Output;
  16. Output.RGBColor = In.Color * ShaderTexture.Sample(SampleType, In.Tex);
  17. return Output;
  18. }