- Timestamp:
- 03/06/07 07:33:14 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPShadowAccum.hlsl
r2188 r2190 29 29 float Deltal = mapsize / SHADOWMAP_SIZE; // size of a lexel edge in world space 30 30 31 float3 r = IN.LightCPos ; // shaded point in light's camera space32 float RR = 1;//R * (r.z - n) / r.z; // directional set in which the light is seen from the shaded point31 float3 r = IN.LightCPos.xyz; // shaded point in light's camera space 32 float RR = R * (r.z - n) / r.z; // directional set in which the light is seen from the shaded point 33 33 float step = RR / KernelSize; 34 34 float RR2 = RR * RR; … … 57 57 } 58 58 //shadow /= KernelSize * KernelSize; 59 shadow *= Deltal * Deltal * step * step/ RR2;59 shadow *= Deltal * Deltal / RR2; 60 60 //shadow = saturate(shadow); 61 61 return 1; 62 62 return shadowColor + (1 - shadowColor) * (1 - shadow); 63 63 }
Note: See TracChangeset
for help on using the changeset viewer.