Guest User

Untitled

a guest
Dec 15th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.55 KB | None | 0 0
  1.    
  2. Code:
  3. // WHAT A WASTE OF GPU.
  4. texture tex1;
  5. float2 rcpres;
  6. //float Timer;
  7. sampler s0 = sampler_state { texture = <tex1>; };
  8.  
  9. float4 Pass0( in float2 Tex : TEXCOORD0 ) : COLOR0
  10. {
  11.    float4 Base = tex2D( s0, Tex.xy );
  12.    return Base;
  13. }
  14.  
  15. float4 Pass1( in float2 Tex : TEXCOORD0 ) : COLOR0
  16. {
  17.    float4 Base = tex2D( s0, Tex.xy );
  18.    float4 Color = Base;
  19.    Color += tex2D( s0, Tex.xy+float2(0,0.0050) )/8;
  20.    Color += tex2D( s0, Tex.xy-float2(0,0.0050) )/8;  
  21.    Color += tex2D( s0, Tex.xy+float2(0.0050,0) )/8;  
  22.    Color += tex2D( s0, Tex.xy-float2(0.0050,0) )/8;
  23.    Color += tex2D( s0, Tex.xy+float2(0.0025,0.0025) )/8;
  24.    Color += tex2D( s0, Tex.xy-float2(0.0025,0.0025) )/8;  
  25.    Color += tex2D( s0, Tex.xy+float2(-0.0025,0.0025) )/8;  
  26.    Color += tex2D( s0, Tex.xy-float2(-0.0025,0.0025) )/8;
  27.    Color += round(Color)/3;
  28.    Base += tex2D( s0, Tex.xy+float2(0,0.0050) )/8;
  29.    Base += tex2D( s0, Tex.xy-float2(0,0.0050) )/8;  
  30.    Base += tex2D( s0, Tex.xy+float2(0.0050,0) )/8;  
  31.    Base += tex2D( s0, Tex.xy-float2(0.0050,0) )/8;
  32.    Base += tex2D( s0, Tex.xy+float2(0.0025,0.0025) )/8;
  33.    Base += tex2D( s0, Tex.xy-float2(0.0025,0.0025) )/8;  
  34.    Base += tex2D( s0, Tex.xy+float2(-0.0025,0.0025) )/8;  
  35.    Base += tex2D( s0, Tex.xy-float2(-0.0025,0.0025) )/8;
  36.    Base.rgb = (Base.r + Base.g + Base.b)/3;
  37.    Base.rgb = round(Base.rgb);
  38.    Base = Base/1.5;
  39.    return (Color * Base)/1.5 + (Color/4);
  40. }
  41.  
  42. Technique T0
  43. {
  44.     pass p0 { PixelShader = compile ps_3_0 Pass0(); }
  45.     pass p1 { PixelShader = compile ps_3_0 Pass1(); }
  46. }
Add Comment
Please, Sign In to add comment