Advertisement
Guest User

Untitled

a guest
May 27th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #pragma once
  2.  
  3. const char shader[] = R"(cbuffer screenProjectionBuffer : register(b0)
  4. {
  5. matrix projection;
  6. };
  7.  
  8. struct VS_OUTPUT
  9. {
  10. float4 pos : SV_POSITION;
  11. float4 col : COLOR;
  12. };
  13.  
  14. struct VS_INPUT
  15. {
  16. float4 pos : POSITION;
  17. float4 col : COLOR;
  18. };
  19.  
  20. VS_OUTPUT VS(VS_INPUT input)
  21. {
  22. VS_OUTPUT output;
  23.  
  24. output.pos = mul(projection, float4(input.pos.xy, 0.f, 1.f));
  25. output.col = input.col;
  26.  
  27. return output;
  28. }
  29.  
  30. float4 PS(VS_OUTPUT input) : SV_TARGET
  31. {
  32. return input.col;
  33. })";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement