- Timestamp:
- 12/02/08 17:32:17 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3204 r3205 149 149 { 150 150 // pixel valid => retrieve the convergence weight 151 w = 10.0f;//oldPixel.y;151 w = oldPixel.y; 152 152 } 153 153 else … … 416 416 417 417 const float squaredLen = SqrLen(diffVec); 418 /* 418 419 419 if (ao.y > 4.0f) oldWeight = 0; 420 420 else if ((ao.y > 1.0f) && (squaredLen < DYNAMIC_OBJECTS_THRESHOLD)) 421 421 oldWeight = min(oldWeight, 4.0f * NUM_SAMPLES); 422 */422 423 423 const float newWeight = ao.z; 424 424 425 425 // blend between old and new samples (and avoid division by zero) 426 426 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); 428 428 429 429 OUT.illum_col.z = SqrLen(diffVec);
Note: See TracChangeset
for help on using the changeset viewer.