- Timestamp:
- 08/24/06 22:29:04 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_PostProc.hlsl
r807 r1282 42 42 uniform float width, 43 43 uniform float height, 44 uniform float cutValue, 45 uniform float timeBlur, 44 46 uniform sampler2D Texture: register(s0) 45 47 ,uniform sampler2D LastTexture: register(s1) … … 47 49 { 48 50 49 /*float intens = length(tex2D(Texture,IN.texCoord ).rgb) / sqrt(3.0);50 return float4(intens,intens,intens,1);*/51 51 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 ); 53 53 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); 56 57 57 float alpha = 0.05; 58 sample = sample *2.0* alpha + tex2D(LastTexture, IN.texCoord) * (1.0 - alpha); 59 58 return sample; 60 59 return sample; 61 60 }
Note: See TracChangeset
for help on using the changeset viewer.