Changeset 807 for GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_DepthShadow.hlsl
- Timestamp:
- 04/24/06 15:44:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note: See TracChangeset
for help on using the changeset viewer.