Ignore:
Timestamp:
09/13/08 13:20:05 (16 years ago)
Author:
mattausch
Message:

changing camera stuff, not working yet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r2928 r2941  
    104104        lightSpacePos /= lightSpacePos.w; 
    105105 
    106         float shadowDepth[9]; 
     106        /*float shadowDepth[9]; 
    107107 
    108108        float w = sampleWidth; 
    109109 
    110110        // pcf sampling using 3 x 3 tab 
    111  
    112111        shadowDepth[0] = tex2D(shadowMap, lightSpacePos.xy).x; 
    113112         
     
    122121        shadowDepth[8] = tex2D(shadowMap, lightSpacePos.xy - float2( 0, -w)).x; 
    123122 
    124         OUT.color = col; 
    125123         
    126124        float depth = lightSpacePos.z; 
     
    134132 
    135133        d /= 9.0f; 
    136          
    137         /*if ((amb < 0.9) && // hack: prevent shadowing the sky  
    138                 (lightSpacePos.z / lightSpacePos.w > shadowDepth)) 
     134        */ 
     135 
     136        OUT.color = col; 
     137 
     138        float shadowDepth = tex2D(shadowMap, lightSpacePos.xy).x; 
     139 
     140        if ((amb < 0.9f) && // hack: prevent shadowing the sky   
     141                (lightSpacePos.z > shadowDepth)) 
    139142        { 
    140143                OUT.color *= 0.1f; 
    141         }*/ 
    142          
    143         if (amb < 0.9) // hack: prevent shadowing the sky        
     144        } 
     145        /* 
     146        if (amb < 0.9f) // hack: prevent shadowing the sky       
    144147        { 
    145148                const float x = 0.1f; 
    146149                OUT.color *= x + (1.0f - x) * (1.0f - d); 
    147150        } 
    148          
     151        */ 
    149152        //OUT.color = lightSpacePos;//float4(lightSpacePos.z / lightSpacePos.w); 
    150153        //OUT.color = float4(shadowDepth); 
Note: See TracChangeset for help on using the changeset viewer.