Ignore:
Timestamp:
09/28/08 23:36:50 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r2978 r2979  
    5252        float numSamples = 0; 
    5353 
    54         // avoid singularity of  
    55         centerPosition.xyz += currentNormal * 1e-4f; 
    56  
    5754        for (int i = 0; i < NUM_SAMPLES; ++ i)  
    5855        { 
     
    8582                const float cos_angle = max(dot(direction_to_sample, currentNormal), 0.0f); 
    8683 
     84                // the distance_scale offset is used to avoid singularity that occurs at global illumination when  
     85                // the distance to a sample approaches zero 
    8786                const float distance_intensity =  
    8887                        (SAMPLE_INTENSITY * DISTANCE_SCALE) / (DISTANCE_SCALE + length_to_sample * length_to_sample); 
Note: See TracChangeset for help on using the changeset viewer.