Advertisement
Guest User

dx9 effect

a guest
Oct 15th, 2012
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. float4x4 worldViewProj;
  2. Texture2D Textures[4];
  3.  
  4.  
  5. struct VS_IN
  6. {
  7. float4 pos : POSITION;
  8. float2 tex : TEXCOORD;
  9. float4 color : COLOR;
  10. };
  11.  
  12. struct PS_IN
  13. {
  14. float4 pos : SV_POSITION;
  15. float2 tex : TEXCOORD;
  16. float4 color : COLOR;
  17. };
  18.  
  19. ////////////////////////////////////////////////////////////////////////////
  20. // Vertex Shader
  21. ////////////////////////////////////////////////////////////////////////////
  22. PS_IN MainVS_9(VS_IN input){
  23. PS_IN output = (PS_IN)0;
  24.  
  25. output.pos = input.pos;
  26. output.tex = input.tex;
  27. output.color = input.color;
  28.  
  29. return output;
  30. }
  31.  
  32. /////////////////////////////////////////////////////////////////////
  33. // Pixel Shader
  34. /////////////////////////////////////////////////////////////////////
  35. float4 ColorPS(PS_IN input) : SV_TARGET
  36. {
  37. return float4(1, 0, 0, 1);
  38. }
  39.  
  40. /////////////////////////////////////////////////////////////////////
  41. // Techniques
  42. /////////////////////////////////////////////////////////////////////
  43.  
  44. technique main_9{
  45. pass p0
  46. {
  47. VertexShader = compile vs_2_0 MainVS_9();
  48.  
  49. ZEnable = true;
  50. ZWriteEnable = true;
  51. ZFunc = LessEqual;
  52. AlphaBlendEnable = false;
  53. CullMode = None;
  54.  
  55. PixelShader = compile ps_2_a ColorPS();
  56. }
  57. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement