Advertisement
Guest User

Raw effect.txt

a guest
Jul 24th, 2013
975
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 KB | None | 0 0
  1.  
  2. //--------------------------------------------------------------------------------------
  3. // Textures
  4. //--------------------------------------------------------------------------------------
  5. texture2D texColor;
  6. //--------------------------------------------------------------------------------------
  7. // Sampler Inputs
  8. //--------------------------------------------------------------------------------------
  9.  
  10.  
  11. sampler2D InputSampler = sampler_state
  12. {
  13. Texture = (texColor);
  14. MinFilter = POINT;
  15. MagFilter = POINT;
  16. MipFilter = POINT;
  17. AddressU = Clamp;
  18. AddressV = Clamp;
  19. SRGBTexture=FALSE;
  20. MaxMipLevel=0;
  21. MipMapLodBias=0;
  22. };
  23.  
  24.  
  25. struct VS_OUTPUT_POST {
  26. float4 vpos : POSITION;
  27. float2 txcoord : TEXCOORD0;
  28. };
  29.  
  30. struct VS_INPUT_POST {
  31. float3 pos : POSITION;
  32. float2 txcoord : TEXCOORD0;
  33. };
  34.  
  35. float pixelWidth;
  36. float pixelHeight;
  37.  
  38.  
  39. //--------------------------------------------------------------------------------------
  40. // Vertex Shader Input
  41. //--------------------------------------------------------------------------------------
  42.  
  43. VS_OUTPUT_POST VS_PostProcess(VS_INPUT_POST IN)
  44. {
  45. VS_OUTPUT_POST OUT;
  46.  
  47. float4 pos=float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);
  48.  
  49. OUT.vpos=pos;
  50. OUT.txcoord.xy=IN.txcoord.xy;
  51.  
  52. return OUT;
  53. }
  54.  
  55. //--------------------------------------------------------------------------------------
  56. // Pixel Shader
  57. //--------------------------------------------------------------------------------------
  58.  
  59. float4 main(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
  60. {
  61. float4 color = tex2D(InputSampler, IN.txcoord);
  62.  
  63. //START HERE WITH YOUR OWN MAGIC ;)
  64.  
  65. color.w=1;
  66.  
  67. return color;
  68. }
  69.  
  70.  
  71.  
  72.  
  73. //--------------------------------------------------------------------------------------
  74. // Compiler
  75. //--------------------------------------------------------------------------------------
  76. technique PostProcess
  77. {
  78. pass P0
  79. {
  80. VertexShader = compile vs_3_0 VS_PostProcess();
  81. PixelShader = compile ps_3_0 main();
  82.  
  83.  
  84. ZEnable=FALSE;
  85. CullMode=NONE;
  86. ALPHATESTENABLE=FALSE;
  87. SEPARATEALPHABLENDENABLE=FALSE;
  88. AlphaBlendEnable=FALSE;
  89. FogEnable=FALSE;
  90. SRGBWRITEENABLE=FALSE;
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement