Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2014
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.74 KB | None | 0 0
  1. float4x4 World;
  2. float4x4 View;
  3. float4x4 Projection;
  4. struct VertexShaderInput
  5. {
  6.     float4 Position : POSITION0;
  7. };
  8. struct VertexShaderOutput
  9. {
  10.     float4 Position : POSITION0;
  11. };
  12. VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
  13. {
  14.     VertexShaderOutput output;
  15.     float4 worldPosition = mul(input.Position, World);
  16.     float4 viewPosition = mul(worldPosition, View);
  17.     output.Position = mul(viewPosition, Projection);
  18.     return output;
  19. }
  20. float4 PixelShaderFunction(VertexShaderOutput input) : COLOR0
  21. {
  22.     return float4(1, 0, 0, 1);
  23. }
  24. technique Technique1
  25. {
  26.     pass Pass1
  27.     {
  28.         VertexShader = compile vs_1_1 VertexShaderFunction();
  29.         PixelShader = compile ps_1_1 PixelShaderFunction();
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement