Changeset 2190 for GTP/trunk


Ignore:
Timestamp:
03/06/07 07:33:14 (18 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/GTPBasic/GTPShadowAccum.hlsl

    r2188 r2190  
    2929        float Deltal = mapsize / SHADOWMAP_SIZE;                                // size of a lexel edge in world space 
    3030         
    31         float3 r = IN.LightCPos;                                                        // shaded point in light's camera space 
    32         float RR = 1;// R * (r.z - n) / r.z;                                    // directional set in which the light is seen from the shaded point 
     31        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 
    3333        float step = RR / KernelSize; 
    3434        float RR2 = RR * RR; 
     
    5757        } 
    5858        //shadow /= KernelSize * KernelSize; 
    59         shadow *= Deltal * Deltal  * step * step/ RR2; 
     59        shadow *= Deltal * Deltal / RR2; 
    6060        //shadow = saturate(shadow); 
    61          
     61        return 1;  
    6262        return shadowColor + (1 - shadowColor) * (1 - shadow); 
    6363} 
Note: See TracChangeset for help on using the changeset viewer.