Changeset 1282 for GTP/trunk/App/Demos/Illum/Ogre/Media/materials
- Timestamp:
- 08/24/06 22:29:04 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/materials
- Files:
-
- 2 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 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/scripts/Glow.material
r1094 r1282 43 43 pass 44 44 { 45 46 { 47 } 48 49 { 50 51 param_named_auto height viewport_height 52 53 } 54 texture_unit 55 { 56 //filtering none 57 texture rockwall.tga58 }59 texture_unit60 {61 //filtering none62 texture rockwall.tga63 45 vertex_program_ref GameTools/PostProc1_VS 46 { 47 } 48 fragment_program_ref GameTools/GlowCut_PS 49 { 50 param_named_auto width viewport_width 51 param_named_auto height viewport_height 52 param_named cutValue float 0.0001 53 param_named timeBlur float 0.008 54 55 } 56 texture_unit 57 { 58 //filtering none 59 } 60 texture_unit 61 { 62 //filtering none 63 } 64 64 } 65 65 } … … 106 106 param_named_auto width viewport_width 107 107 param_named_auto height viewport_height 108 param_named Stretch float 3.2108 param_named Stretch float 1.2 109 109 } 110 110 texture_unit … … 131 131 param_named_auto width viewport_width 132 132 param_named_auto height viewport_height 133 param_named Stretch float 3.2133 param_named Stretch float 1.2 134 134 } 135 135 texture_unit
Note: See TracChangeset
for help on using the changeset viewer.