Ignore:
Timestamp:
04/24/06 15:44:00 (18 years ago)
Author:
szirmay
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Illum/Ogre/Media/materials/programs/GameTools_DepthShadow.hlsl

    r777 r807  
    5050                                        uniform sampler2D depthShadowMap ):COLOR 
    5151{ 
    52         float bias = 5; 
     52        float bias = 0.0; 
    5353        float4 shadowColor = float4(0.4, 0.4, 0.4, 1.0); 
    5454 
     
    6666                lightScreenPos = ( lightScreenPos + 1.0 ) / 2.0; 
    6767                lightScreenPos.y = 1.0 - lightScreenPos.y; 
    68                 float storedDepth = tex2D(depthShadowMap, lightScreenPos.xy).r; 
     68                float4 storedDepth = tex2D(depthShadowMap, lightScreenPos.xy); 
     69                         
    6970                 
    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;                       
    7275        } 
    7376        else 
    74                 light = shadowColor; 
     77                light = 1; 
    7578                 
    7679        return light;    
Note: See TracChangeset for help on using the changeset viewer.