Advertisement
Guest User

Untitled

a guest
Jun 4th, 2013
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. // DisplayLessThan16 v1.1=ps_2_0
  2. // http://www.homecinema-fr.com/forum/viewtopic.php?t=29814317
  3.  
  4. sampler s0 : register(s0);
  5. float4 p0 : register(c0);
  6. float4 p1 : register(c1);
  7.  
  8. #define width (p0[0])
  9. #define height (p0[1])
  10. #define counter (p0[2])
  11. #define clock (p0[3])
  12. #define one_over_width (p1[0])
  13. #define one_over_height (p1[1])
  14.  
  15. #define PI acos(-1)
  16. #define Value_16 (16.0/255.0)
  17.  
  18. float4 main(float2 tex : TEXCOORD0) : COLOR
  19. {
  20. float4 c0 = tex2D(s0, tex);
  21.  
  22. if( c0[0]<Value_16 )
  23. c0 = float4( 0, 1, 0, 0 );
  24. else if( c0[1]<Value_16 )
  25. c0 = float4( 0, 1, 0, 0 );
  26. else if( c0[2]<Value_16 )
  27. c0 = float4( 0, 1, 0, 0 );
  28.  
  29. return c0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement