Ignore:
Timestamp:
08/24/06 22:29:04 (18 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

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

    r807 r1282  
    4242                uniform float width, 
    4343                uniform float height, 
     44                uniform float cutValue, 
     45                uniform float timeBlur, 
    4446                uniform sampler2D Texture: register(s0) 
    4547                ,uniform sampler2D LastTexture: register(s1) 
     
    4749{        
    4850 
    49         /*float intens = length(tex2D(Texture,IN.texCoord ).rgb) / sqrt(3.0); 
    50         return float4(intens,intens,intens,1);*/ 
    5151        IN.texCoord += float2(0.5/width, 0.5/height); 
    52         float4 sample = tex2D(Texture,IN.texCoord ); 
     52        float4 sample = 2.0 * tex2D(Texture,IN.texCoord ); 
    5353        float luminance = dot(sample.rgb, float3(1.0, 4.5907, 0.0601)); 
    54         if (luminance < 5.0) sample = float4(0,0,0,0); 
    55         //if (sample.r + sample.g + sample.b < 1.7f) sample = float4(0,0,0,0); 
     54        if (luminance < cutValue) sample = float4(0,0,0,0); 
     55        float alpha = timeBlur; 
     56        sample = sample * alpha + tex2D(LastTexture, IN.texCoord) * (1.0 - alpha); 
    5657         
    57         float alpha = 0.05; 
    58         sample = sample *2.0* alpha + tex2D(LastTexture, IN.texCoord) * (1.0 - alpha); 
    59          
     58        return sample; 
    6059        return sample; 
    6160} 
Note: See TracChangeset for help on using the changeset viewer.