- Timestamp:
- 02/23/09 18:33:26 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3325 r3326 273 273 // to the current pixel or if the angle is small enough 274 274 // to have any influence in the current or last frame 275 #if 1275 #if 0 276 276 const float tooFarAway = step(0.5f, lengthToSample - changeFactor); 277 277 … … 281 281 else 282 282 validSamples = max(validSamples, pixelValid); 283 #else284 validSamples = max(validSamples, pixelValid);285 283 #endif 286 284 … … 408 406 // or if the angle is small enough 409 407 // to have any influence in the current or last frame 410 #if 1408 #if 0 411 409 const float partlyResetThres = 1.0f; 412 410 … … 416 414 else 417 415 validSamples = max(validSamples, pixelValid); 418 #else419 validSamples = max(validSamples, pixelValid);420 416 #endif 421 417 … … 523 519 if (eyeSpaceDepth < DEPTH_THRESHOLD) 524 520 { 525 //ao = ssao(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, isMovingObject); 526 ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, isMovingObject, normals, oldIdx); 521 if (0) 522 ao = ssao(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, isMovingObject); 523 else 524 ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, 525 bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, 526 isMovingObject, normals, oldIdx); 527 527 } 528 528 else … … 545 545 546 546 // don't check for moving objects, otherwise almost no coherence 547 if (!isMovingObject)547 /*if (!isMovingObject) 548 548 { 549 549 if (ao.y > completelyResetThres) … … 558 558 oldIdx = .0f; 559 559 } 560 } 560 }*/ 561 561 562 562 563 ////////// … … 573 574 OUT.illum_col.w = eyeSpaceDepth; 574 575 575 // can be used to check if this pixel belongs to a moving object576 // this value can be used to check if this pixel belongs to a moving object 576 577 OUT.col.x = SqrLen(diffVec); 577 578 //OUT.illum_col.z = SqrLen(diffVec); 578 579 580 OUT.illum_col.xyz = normal.xyz; 579 581 return OUT; 580 582 }
Note: See TracChangeset
for help on using the changeset viewer.