Ignore:
Timestamp:
04/13/09 12:16:29 (15 years ago)
Author:
mattausch
Message:

works well with index

File:
1 edited

Legend:

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

    r3343 r3344  
    377377 
    378378                const float minDist = 1e-6f; 
    379                 const float delta = 1e-3f; 
     379                const float eps = 1e-3f; 
    380380 
    381381                const float lengthToSample = length(dirSample); 
    382                 const float sampleWeight = 1.0f / (lengthToSample + delta); 
     382                const float sampleWeight = 1.0f / max(lengthToSample, eps); 
    383383 
    384384                dirSample /= max(length(dirSample), minDist); // normalize 
     
    599599 
    600600        OUT.illum_col.y = combinedWeight; 
    601         OUT.illum_col.z = oldIdx + 8;//newWeight; // the new index 
     601        OUT.illum_col.z = oldIdx + newWeight; // the new index 
    602602        OUT.illum_col.w = eyeSpaceDepth; 
    603603 
Note: See TracChangeset for help on using the changeset viewer.