- Timestamp:
- 02/25/09 17:41:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3326 r3328 253 253 254 254 // retrieve the sample from the last frame 255 const float4 oldPixel = tex2Dlod( myTex, float4(oldTexCoords, .0f, .0f));256 const float oldDiff = tex2Dlod( oldTex, float4(oldTexCoords, .0f, .0f)).x;255 const float4 oldPixel = tex2Dlod(oldTex, float4(oldTexCoords, .0f, .0f)); 256 const float oldDiff = tex2Dlod(myTex, float4(oldTexCoords, .0f, .0f)).x; 257 257 258 258 // calculate eye space position of sample in old frame … … 272 272 273 273 // check if the pixel belonged to a dynamic object in the last frame 274 const bool newDynamic = (squaredLen > 100000);//DYNAMIC_OBJECTS_THRESHOLD);275 const bool oldDynamic = (oldDiff > 1000000);//DYNAMIC_OBJECTS_THRESHOLD);274 const bool newDynamic = (squaredLen > DYNAMIC_OBJECTS_THRESHOLD); 275 const bool oldDynamic = (oldDiff > DYNAMIC_OBJECTS_THRESHOLD); 276 276 277 277 … … 306 306 } 307 307 308 //isPixelValid = 2e20f;309 308 return float2(isPixelValid, abs(oldEyeSpaceDepth - projectedEyeSpaceDepth)); 310 309 }
Note: See TracChangeset
for help on using the changeset viewer.