Ignore:
Timestamp:
12/02/08 17:32:17 (16 years ago)
Author:
mattausch
Message:

as good as i cab do it right now but flickering when dynamic object enters + if dynamic object stops

File:
1 edited

Legend:

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

    r3204 r3205  
    149149        { 
    150150                // pixel valid => retrieve the convergence weight 
    151                 w = 10.0f;//oldPixel.y; 
     151                w = oldPixel.y; 
    152152        } 
    153153        else 
     
    416416 
    417417        const float squaredLen = SqrLen(diffVec); 
    418 /*       
     418 
    419419        if (ao.y > 4.0f) oldWeight = 0; 
    420420        else if ((ao.y > 1.0f) && (squaredLen < DYNAMIC_OBJECTS_THRESHOLD)) 
    421421                oldWeight = min(oldWeight, 4.0f * NUM_SAMPLES); 
    422 */       
     422         
    423423        const float newWeight = ao.z; 
    424424 
    425425        // blend between old and new samples (and avoid division by zero) 
    426426        OUT.illum_col.x = (ao.x * newWeight + oldSsao * oldWeight) / max(1e-6f, (newWeight + oldWeight)); 
    427         OUT.illum_col.y = oldWeight;//clamp(newWeight + oldWeight, .0f, temporalCoherence); 
     427        OUT.illum_col.y = clamp(newWeight + oldWeight, .0f, temporalCoherence); 
    428428 
    429429        OUT.illum_col.z = SqrLen(diffVec); 
Note: See TracChangeset for help on using the changeset viewer.