Ignore:
Timestamp:
03/09/07 10:31:48 (18 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

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

    r2186 r2217  
    1515#define DEPTH_BIAS_VSM  0.001 
    1616#define DEPTH_EPSILON   0.00005 
    17 #define DIST_BIAS       0.1 
    18 #define DIST_BIAS_VSM   0.001 
     17#define DIST_BIAS       0.005 
     18#define DIST_BIAS_VSM   0.005 
    1919#define DIST_EPSILON    0.001 
    2020 
    21 #define shadowColor float4(0.2,0.2,0.2,1) 
     21#define shadowColor float4(0.5,0.5,0.5,1) 
    2222 
    2323float4 shadowMapDepth(LightVPos_OUT IN, 
     
    7878  {      
    7979    float4 pos = (IN.LightVPos / IN.LightVPos.w); 
    80         //float d = length(pos.xy); 
    81     //light = saturate((1.0 - d)/0.05);          
    82     //if(d <= 1.0) 
    83     //{ 
     80        float d = length(pos.xy); 
     81    light = saturate((1.0 - d)/0.05);            
     82    if(d <= 1.0) 
     83    { 
    8484                float dist = length(IN.LightCPos.xyz) / lightFarPlane; 
    8585                pos.xy = (pos.xy + 1.0) / 2.0; 
     
    8888                dist -= DIST_BIAS; 
    8989                light = max(dist <= storedDist.r, shadowColor);          
    90     //} 
     90    } 
    9191  } 
    9292         
Note: See TracChangeset for help on using the changeset viewer.