- Timestamp:
- 04/20/09 09:11:32 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3360 r3361 40 40 41 41 // hack: prevent to shade the sky 42 #if 142 #if 0 43 43 if (color.w > DEPTH_THRESHOLD) 44 44 { … … 250 250 251 251 // compute position from old frame for dynamic objects + translational portion 252 //const float3 translatedPos = difVec - oldEyePos + worldPos.xyz;252 const float3 translatedPos = difVec - oldEyePos + worldPos.xyz; 253 253 // don't use difVec here: want to detect if the actual pixel has changed => ssao changed 254 const float3 translatedPos = -oldEyePos + worldPos.xyz;254 //const float3 translatedPos = -oldEyePos + worldPos.xyz; 255 255 256 256 … … 293 293 // means that we only use slight temporal coherence over some frames 294 294 // so that there is no noticeable drag 295 const float pixelCouldBeValid = 2.0f;295 const float pixelCouldBeValid = 4.0f; 296 296 // this pixel information has to be discarded in order to not create artifacts 297 297 const float pixelIsNotValid = 100.0f; … … 306 306 } 307 307 else if ( // check if changed from dynamic to not dynamic object 308 ((oldDynamic && !newDynamic) || (!oldDynamic && newDynamic) || 308 ( 309 (oldDynamic && !newDynamic) || (!oldDynamic && newDynamic) || 309 310 ( 310 311 (oldEyeSpaceDepth < DEPTH_THRESHOLD) && (projectedEyeSpaceDepth < DEPTH_THRESHOLD) && 311 312 (oldDynamic || newDynamic) && // check if we have a dynamic object 312 (depthDif > MIN_DEPTH_DIFF)))) // and there is a depth discontinuity 313 (depthDif > MIN_DEPTH_DIFF))) 314 ) // and there is a depth discontinuity 313 315 { 314 316 isPixelValid = pixelCouldBeValid;
Note: See TracChangeset
for help on using the changeset viewer.