Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg	(revision 3227)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg	(revision 3230)
@@ -93,6 +93,4 @@
 	const float depthDif = abs(1.0f - oldEyeSpaceDepth / projectedEyeSpaceDepth);
 
-	//const float xOffs = 1.0f / 1024.0f; const float yOffs = 1.0f / 768.0f; const float eps = 1e-6f;
-
 	// the weight of the accumulated samples from the previous frames
 	float w;
@@ -102,6 +100,4 @@
 
 	if (1
-	//	&& (oldTexCoords.x + eps >= xOffs) && (oldTexCoords.x <= 1.0f - xOffs + eps)
-	//	&& (oldTexCoords.y + eps >= yOffs) && (oldTexCoords.y <= 1.0f - yOffs + eps)
 		&& (oldTexCoords.x > 0) && (oldTexCoords.x < 1.0f)
 		&& (oldTexCoords.y > 0) && (oldTexCoords.y < 1.0f)
@@ -232,5 +228,5 @@
 			float3 tr, 
 			float3 viewDir,
-			float newWeight,
+			float convergence,
 			float sampleIntensity,
 			bool isMovingObject
@@ -243,7 +239,5 @@
 	for (int i = 0; i < NUM_SAMPLES; ++ i) 
 	{
-		const float2 offset = samples[i];
-
-		float2 offsetTransformed;
+		float2 offset;
 
 		////////////////////
@@ -251,11 +245,17 @@
 		//-- (affects performance for some reason!)
 
-		float2 mynoise = tex2Dlod(noiseTex, float4(IN.texCoord * 4.0f, 0, 0)).xy;
-		//float2 mynoise = tex2Dlod(noiseTex, float4(IN.texCoord, 0, 0)).xy;
-		//offsetTransformed = myreflect(offset, mynoise);
-		offsetTransformed = myrotate(offset, mynoise.x);
+		if (convergence < 700)
+		{
+			float2 mynoise = tex2Dlod(noiseTex, float4(IN.texCoord * 4.0f, 0, 0)).xy;
+			//offsetTransformed = myreflect(offset, mynoise);
+			offset = myrotate(samples[i], mynoise.x);
+		}
+		else
+		{
+			offset = samples[i];
+		}
 		
 		// weight with projected coordinate to reach similar kernel size for near and far
-		const float2 texcoord = IN.texCoord.xy + offsetTransformed * scaleFactor;
+		const float2 texcoord = IN.texCoord.xy + offset * scaleFactor;
 
 		const float4 sampleColor = tex2Dlod(colors, float4(texcoord, .0f, .0f));
@@ -299,11 +299,12 @@
 		// we can bail out early and use a minimal #samples)
 		// if some conditions are met as long as the hardware supports it
-		if (numSamples >= 8)
+		if (numSamples >= MIN_SAMPLES)
 		{
+			//break;
 			// if the pixel belongs to a static object and all the samples stay valid in the current frame
 			if (!isMovingObject && (validSamples < 1.0f)) break;
 			// if the pixel belongs to a dynamic object but the #accumulated samples for this pixel is sufficiently high 
 			// (=> there was no discontinuity recently)
-			else if (isMovingObject && (newWeight > NUM_SAMPLES * 5)) break;
+			else if (isMovingObject && (convergence > NUM_SAMPLES * 5)) break;
 		}
 #endif
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg	(revision 3227)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg	(revision 3230)
@@ -230,5 +230,5 @@
 	// compute position from old frame for dynamic objects + translational portion
 	//const float3 translatedPos = difVec - oldEyePos + worldPos.xyz;
-	const float3 translatedPos = - oldEyePos + worldPos.xyz;
+	const float3 translatedPos = -oldEyePos + worldPos.xyz;
 
 
@@ -276,10 +276,11 @@
 		pixelValid = pixelNotValid;
 	}
-	else if (!((oldEyeSpaceDepth > 1e10f) || (projectedEyeSpaceDepth > 1e10f)) &&
+	else if (//!((oldEyeSpaceDepth > 1e10f) || (projectedEyeSpaceDepth > 1e10f)) &&
 		// check if changed from dynamic to not dynamic object
 		((oldDynamic && !newDynamic) || (!oldDynamic && newDynamic) ||
 		// check if we have a dynamic object and is a depth discontinuity
 		(
-		//(oldDynamic || newDynamic) && 
+		(oldDynamic || newDynamic) && 
+		//(depthDif > 1e-5f))))
 		(depthDif > MIN_DEPTH_DIFF))))
 	{	
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/common.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/common.h	(revision 3227)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/common.h	(revision 3230)
@@ -59,2 +59,5 @@
 	return rpt;
 }
+
+
+#define USE_GTX
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg	(revision 3212)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg	(revision 3230)
@@ -186,5 +186,5 @@
 	currentPos /= currentPos.w;
 	
-	const float currentDepth = currentPos.z * PRECISION_SCALE;
+	const float currentDepth = currentPos.z;
 
 	///////////
@@ -203,5 +203,5 @@
 
 	// the current depth projected into the old frame
-	const float projDepth = projPos.z * PRECISION_SCALE;
+	const float projDepth = projPos.z;
 
 	// fit from unit cube into 0 .. 1
