Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Feb 9th, 2010 | Syntax: C# | Size: 0.71 KB | Hits: 19 | Expires: Never
This paste has a previous version, view the difference. Copy text to clipboard
  1. float4x4 WorldViewProjection : WORLDVIEWPROJECTION;
  2.  
  3. sampler tex;
  4.  
  5. struct VertexShaderInput
  6. {
  7.     float4 Position : POSITION0;
  8. };
  9. struct VertexShaderOutput
  10. {
  11.     float4 Position : POSITION0;
  12. };
  13. VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
  14. {
  15.     VertexShaderOutput output;
  16.  
  17.     output.Position = mul(input.Position, WorldViewProjection );
  18.  
  19.     return output;
  20. }
  21. float4 PixelShaderFunction(float2 uv : TEXCOORD0, float4 tint : COLOR0) : COLOR0
  22. {
  23.         float4 color = tex2D(tex, uv);
  24.        
  25.         return color * tint;
  26. }
  27. technique Technique1
  28. {
  29.     pass Pass1
  30.     {
  31.         VertexShader = compile vs_1_1 VertexShaderFunction();
  32.         PixelShader = compile ps_2_0 PixelShaderFunction();
  33.     }
  34. }