Ignore:
Timestamp:
05/14/07 11:03:30 (18 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_Blur.hlsl

    r2368 r2373  
    2424                        uniform float height ) : COLOR 
    2525 
    26  
     26/* 
    2727  float2 pixel = float2(1.0 / width, 1.0 / height); 
    2828  float2 uv = IN.Position + pixel * 0.5; 
     
    3535 
    3636  sum /= samplesU * samplesV; 
    37  
    38   return sum; 
    39   return tex2D(Texture, uv); 
     37*/ 
     38  float du = 2.0 / width; 
     39  float dv = 2.0 / height; 
     40  float2 uv = IN.Position; 
     41  float4 sum = float4(0,0,0,0);   
     42  sum += tex2D(Texture,uv); 
     43  sum += tex2D(Texture,uv + float2(du,0)); 
     44  sum += tex2D(Texture,uv + float2(du,dv)); 
     45  sum += tex2D(Texture,uv + float2(0,dv)); 
     46  return sum / 4.0; 
    4047} 
    4148 
Note: See TracChangeset for help on using the changeset viewer.