Changeset 807 for GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs
- Timestamp:
- 04/24/06 15:44:00 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_Cau.hlsl
r777 r807 29 29 30 30 float4 pos = tex2Dlod(PhotonHitMap, float4(position.x, 1.0 - position.y,0,0)).rgba; 31 if(pos.a != 1)//no photon hit31 if(pos.a == 0)//no photon hit 32 32 { 33 33 OUT.center = 1000.0f; -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_Caustic.hlsl
r777 r807 39 39 float dist = readDistanceCubeMap(distanceCube, dir); 40 40 41 float EPSILON = 10.0;41 float EPSILON = 20.0; 42 42 43 43 if(mydist > dist + EPSILON) caustic = 0; 44 44 45 46 45 Color = caustic; 47 46 -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_CausticSoftShadow.hlsl
r788 r807 60 60 61 61 half3 wNormal =mul(tNormal, ModelToTangent ); 62 wNormal = IN.Normal;62 //wNormal = IN.Normal; 63 63 wNormal = normalize(mul( wNormal, world_IT )); 64 64 ///shading -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_DepthShadow.hlsl
r777 r807 50 50 uniform sampler2D depthShadowMap ):COLOR 51 51 { 52 float bias = 5;52 float bias = 0.0; 53 53 float4 shadowColor = float4(0.4, 0.4, 0.4, 1.0); 54 54 … … 66 66 lightScreenPos = ( lightScreenPos + 1.0 ) / 2.0; 67 67 lightScreenPos.y = 1.0 - lightScreenPos.y; 68 float storedDepth = tex2D(depthShadowMap, lightScreenPos.xy).r; 68 float4 storedDepth = tex2D(depthShadowMap, lightScreenPos.xy); 69 69 70 70 if(storedDepth + bias < d) 71 light = shadowColor; 71 if(storedDepth.r + bias < d) 72 light = shadowColor; 73 if(storedDepth.r == 0) 74 light = 1; 72 75 } 73 76 else 74 light = shadowColor;77 light = 1; 75 78 76 79 return light; -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_Localized_EnvMap.hlsl
r777 r807 30 30 { 31 31 float dist = texCUBE(dcm, float3(coord.xy, - coord.z)).r; 32 if(dist == 0) dist = 400; ///sky32 if(dist == 0) dist = 100000; ///sky 33 33 return dist; 34 34 } … … 235 235 Color = float4(normalize(newTexCoord),1); 236 236 237 //Color = 0.0001 * Color + float4(0,0,1,1); 238 //Color += 0.0001 * lastCenter.x; 237 239 if(dot(V,mNormal)>0) 238 240 { 239 241 Color = float4(1,0,0,0); 240 } 241 242 ///return 1 + 0.0001 * Color; 242 } 243 243 return Color; 244 244 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_PostProc.hlsl
r788 r807 56 56 57 57 float alpha = 0.05; 58 sample = sample * alpha + tex2D(LastTexture, IN.texCoord) * (1.0 - alpha);58 sample = sample *2.0* alpha + tex2D(LastTexture, IN.texCoord) * (1.0 - alpha); 59 59 60 60 return sample;
Note: See TracChangeset
for help on using the changeset viewer.