Changeset 2311 for GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic
- Timestamp:
- 04/03/07 12:11:24 (18 years ago)
- Location:
- GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPBasic.material
r2294 r2311 80 80 } 81 81 fragment_program_ref GTP/Basic/CDepth_PS 82 { 82 { 83 param_named_auto farplane far_clip_distance 83 84 } 84 85 } -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPBasic_PS.hlsl
r2294 r2311 38 38 } 39 39 40 float4 CDepth(CPos_OUT IN) : COLOR 40 float4 CDepth(CPos_OUT IN, 41 uniform float farplane) : COLOR 41 42 { 42 return -IN.CPos.z;43 return float4(-IN.CPos.z, -IN.CPos.z / farplane, 1, -IN.CPos.z); 43 44 } 44 45 -
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPShadowMap_PS.hlsl
r2294 r2311 15 15 #define DEPTH_BIAS_VSM 0.001 16 16 #define DEPTH_EPSILON 0.05 17 #define DIST_BIAS 0.00 518 #define DIST_BIAS_VSM 0.0 519 #define DIST_EPSILON 0.0 117 #define DIST_BIAS 0.0005 18 #define DIST_BIAS_VSM 0.0005 19 #define DIST_EPSILON 0.001 20 20 21 21 //#define shadowColor float4(0.9,0.9,0.9,1) 22 #define shadowColor float4(0. 1,0.1,0.1,1)22 #define shadowColor float4(0.2,0.2,0.2,1) 23 23 24 24 float4 shadowMapDepth(LightVPos_OUT IN, … … 87 87 pos.xy = (pos.xy + 1.0) / 2.0; 88 88 pos.y = 1.0 - pos.y; 89 float 4 storedDist = tex2D(shadowMap, pos.xy);90 dist -= DIST_BIAS;91 light = max(dist <= storedDist.r, shadowColor);89 float storedDist = tex2D(shadowMap, pos.xy).r; 90 light = max(dist < storedDist + DIST_BIAS, shadowColor); 91 light = dist < storedDist + DIST_BIAS; 92 92 } 93 93 }
Note: See TracChangeset
for help on using the changeset viewer.