Guest User

Untitled

a guest
Mar 30th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. // -----------------------------------------------------------------------------
  2. // Original code from SlimDX project.
  3. // Greetings to SlimDX Group. Original code published with the following license:
  4. // -----------------------------------------------------------------------------
  5. /*
  6. * Copyright (c) 2007-2011 SlimDX Group
  7. *
  8. * Permission is hereby granted, free of charge, to any person obtaining a copy
  9. * of this software and associated documentation files (the "Software"), to deal
  10. * in the Software without restriction, including without limitation the rights
  11. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  12. * copies of the Software, and to permit persons to whom the Software is
  13. * furnished to do so, subject to the following conditions:
  14. *
  15. * The above copyright notice and this permission notice shall be included in
  16. * all copies or substantial portions of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  19. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  20. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  21. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  22. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  23. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  24. * THE SOFTWARE.
  25. */
  26. struct VS_IN
  27. {
  28. float4 pos : POSITION;
  29. float2 tex : TEXCOORD;
  30. };
  31.  
  32. struct PS_IN
  33. {
  34. float4 pos : SV_POSITION;
  35. float2 tex : TEXCOORD;
  36. };
  37.  
  38.  
  39. Texture2D picture : register(t0);
  40. SamplerState pictureSampler : register(s0);
  41.  
  42. PS_IN VS( VS_IN input )
  43. {
  44. PS_IN output = (PS_IN)0;
  45.  
  46. output.pos = input.pos;
  47. output.tex = input.tex;
  48.  
  49. return output;
  50. }
  51.  
  52. float4 PS(PS_IN input) : SV_Target
  53. {
  54. return picture.Sample(pictureSampler, input.tex);
  55. }
Add Comment
Please, Sign In to add comment