Recent Posts
C++ | 34 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 2 min ago
None | 2 min ago
mIRC | 3 min ago
C++ | 4 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Anonymous on the 10th of Feb 2010 12:50:26 AM Download | Raw | Embed | Report
  1. float4x4 World;
  2. float4x4 View;
  3. float4x4 Projection;
  4.  
  5. sampler tex;
  6.  
  7. struct VertexShaderInput
  8. {
  9.     float4 Position : POSITION0;
  10. };
  11. struct VertexShaderOutput
  12. {
  13.     float4 Position : POSITION0;
  14. };
  15. VertexShaderOutput VertexShaderFunction(VertexShaderInput input)
  16. {
  17.     VertexShaderOutput output;
  18.  
  19.     float4 worldPosition = mul(input.Position, World);
  20.     float4 viewPosition = mul(worldPosition, View);
  21.     output.Position = mul(viewPosition, Projection);
  22.  
  23.     return output;
  24. }
  25. float4 PixelShaderFunction(float2 uv : TEXCOORD0, float4 tint : COLOR0) : COLOR0
  26. {
  27.         float4 color = tex2D(tex, uv);
  28.        
  29.         return color * tint;
  30. }
  31. technique Technique1
  32. {
  33.     pass Pass1
  34.     {
  35.         VertexShader = compile vs_1_1 VertexShaderFunction();
  36.         PixelShader = compile ps_2_0 PixelShaderFunction();
  37.     }
  38. }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: