Advertisement
Guest User

Untitled

a guest
Jan 2nd, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. sampler s0 : register(s0);
  2. float4 p1 : register(c1);
  3. #define px (p1[0])
  4. #define py (p1[1])
  5.  
  6. static int wcount = 31;
  7. static float weights[] = {
  8. 0.01616028, 0.01838334, 0.02072716, 0.02316300, 0.02565602,
  9. 0.02816589, 0.03064766, 0.03305298, 0.03533162, 0.03743313,
  10. 0.03930867, 0.04091289, 0.04220574, 0.04315414, 0.04373338,
  11. 0.04392819, 0.04373338, 0.04315414, 0.04220574, 0.04091289,
  12. 0.03930867, 0.03743313, 0.03533162, 0.03305298, 0.03064766,
  13. 0.02816589, 0.02565602, 0.02316300, 0.02072716, 0.01838334,
  14. 0.01616028
  15. };
  16.  
  17. float4 main(float2 tex : TEXCOORD0) : COLOR
  18. {
  19. float3 c0 = float3(0.0, 0.0, 0.0);
  20. for (int i = 0; i < wcount; i++)
  21. c0 += tex2D(s0, tex - float2((i - wcount/2) * 2.0 * px, 0.0)).rgb * weights[i];
  22.  
  23. return float4(c0, 0.0);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement