Mrowqa

MPC-HC dick shader :D

Nov 12th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.34 KB | None | 0 0
  1. sampler s0 : register(s0);
  2. float4 p0 :  register(c0);
  3. float4 p1 :  register(c1);
  4.  
  5. #define width   (p0[0])
  6. #define height  (p0[1])
  7. #define counter (p0[2])
  8. #define clock   (p0[3])
  9. #define one_over_width  (p1[0])
  10. #define one_over_height (p1[1])
  11. #define PI acos(-1)
  12.  
  13. #define intensity 0.3
  14.  
  15. float4 main(float2 tex : TEXCOORD0) : COLOR {
  16.         float4 c0 = tex2D(s0, tex);
  17.         c0.r += sin(clock)*intensity;
  18.         c0.g -= cos(clock)*intensity;
  19.         c0.b += cos(clock)*intensity;
  20.        
  21.         float2 pos = float2(0.5, 0.5);
  22.         float dst = distance(tex,pos);
  23.         float r = 0.1;
  24.         float d = 0.01;
  25.         if(dst > r-d && dst < r+d)
  26.                 c0.rgb = float3(0,0,0);
  27.  
  28.         pos = float2(0.7, 0.5);
  29.         dst = distance(tex,pos);
  30.         if(dst > r-d && dst < r+d)
  31.                 c0.rgb = float3(0,0,0);
  32.  
  33.         if(abs(tex.x+r/2) > 0.6-r/2 && abs(tex.x+r/3) < 0.6-r/2 && tex.y < 0.4)
  34.                 c0.rgb = float3(0,0,0);
  35.  
  36.         if(abs(tex.x+r/2)-r*2 > 0.6-r/2 && abs(tex.x+r/3)-r*2 < 0.6-r/2 && tex.y < 0.4)
  37.                 c0.rgb = float3(0,0,0);
  38.  
  39.         if(tex.x>0.5 && tex.x<0.7 && (tex.y < 0.03 || (tex.y < 0.2 && tex.y> 0.15)))
  40.                 c0.rgb = float3(0,0,0);
  41.  
  42.         if(tex.x>0.59 && tex.x<0.62 && tex.y < 0.1)
  43.                 c0.rgb = float3(0,0,0);
  44.  
  45.         return c0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment