Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h	(revision 3329)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h	(revision 3331)
@@ -6,8 +6,9 @@
 //-- ssao + gi parameters
 #define NUM_PRECOMPUTED_SAMPLES 4096
-//#define NUM_SAMPLES 8
+
+#define NUM_SAMPLES 8
 //#define NUM_SAMPLES 16
 //#define NUM_SAMPLES 24
-#define NUM_SAMPLES 24
+//#define NUM_SAMPLES 24
 
 //#define MIN_SAMPLES 48
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg	(revision 3330)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg	(revision 3331)
@@ -182,5 +182,5 @@
 			 float3 normal,
 			 float3 centerPosition,
-			 float scaleFactor,
+			 float radius,
 			 float3 bl,
 			 float3 br,
@@ -223,5 +223,5 @@
 		
 		// weight with projected coordinate to reach similar kernel size for near and far
-		const float2 texcoord = IN.texCoord.xy + offset * scaleFactor;
+		const float2 texcoord = IN.texCoord.xy + offset * radius;
 
 		const float4 sampleColor = tex2Dlod(colors, float4(texcoord, .0f, .0f));
@@ -235,8 +235,8 @@
 
 		const float minDist = 1e-6f;
-		const float scaleFactor = 1e-3f;
+		const float delta = 1e-3f;
 
 		const float lengthToSample = length(dirSample);
-		const float sampleWeight = 1.0f / (lengthToSample + scaleFactor);
+		const float sampleWeight = 1.0f / (lengthToSample + delta);
 
 		dirSample /= max(lengthToSample, minDist); // normalize
@@ -329,5 +329,5 @@
 			float3 normal,
 			float3 centerPosition,
-			float scaleFactor,
+			float radius,
 			float3 bl,
 			float3 br,
@@ -370,5 +370,5 @@
 
 		// weight with projected coordinate to reach similar kernel size for near and far
-		const float2 texcoord = IN.texCoord.xy + offset * scaleFactor;
+		const float2 texcoord = IN.texCoord.xy + offset * radius;
 
 		const float4 sampleColor = tex2Dlod(colors, float4(texcoord, .0f, .0f));
@@ -382,8 +382,8 @@
 
 		const float minDist = 1e-6f;
-		const float scaleFactor = 1e-3f;
+		const float delta = 1e-3f;
 
 		const float lengthToSample = length(dirSample);
-		const float sampleWeight = 1.0f / (lengthToSample + scaleFactor);
+		const float sampleWeight = 1.0f / (lengthToSample + delta);
 
 		dirSample /= max(length(dirSample), minDist); // normalize
@@ -399,5 +399,5 @@
 
 		++ numSamples;
-
+#ifdef PERFORMANCE_TEST
 		// check if the samples have been valid in the last frame
 		// only mark sample as invalid if in the last / current frame
@@ -411,4 +411,5 @@
 		// or if the angle is small enough
 		// to have any influence in the current or last frame
+
 #if 1
 		const float partlyResetThres = 1.0f;
@@ -435,4 +436,7 @@
 		}
 #endif
+
+#endif // PERFORMANCE_TEST
+
 	}
 
@@ -488,7 +492,4 @@
 	const float4 eyeSpacePos = float4(-viewDir * eyeSpaceDepth, 1.0f);
 
-	float3 diffVec = tex2Dlod(attribsTex, float4(IN.texCoord, 0, 0)).xyz;
-	
-
 	////////////////
 	//-- calculcate the current projected posiion (also used for next frame)
@@ -497,5 +498,12 @@
 	const float invw = 1.0f / projPos.w;
 	projPos *= invw;
-	float scaleFactor = kernelRadius * invw;
+	
+	//const float radiusMult = kernelRadius;
+	const float radiusMult = 3e-2;
+	//const float radiusMult = kernelRadius * invw;
+	
+#ifdef PERFORMANCE_TEST	
+
+	float3 diffVec = tex2Dlod(attribsTex, float4(IN.texCoord, 0, 0)).xyz;
 
 	const float sqrMoveSpeed = SqrLen(diffVec);
@@ -514,5 +522,5 @@
 									diffVec
 									);
-
+	
 	const float oldSsao = temporalVals.x;
 	
@@ -520,4 +528,14 @@
 	float oldIdx = temporalCoherence > 1 ? temporalVals.z : 0;
 	
+#else
+
+	const bool isMovingObject = false;
+	const float oldSsao = 0;
+	
+	float oldWeight = 0;
+	float oldIdx = 0;
+	
+#endif
+
 	float3 ao;
 
@@ -528,10 +546,10 @@
 		{
 			ao = ssao(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, 
-				      scaleFactor, bl, br, tl, tr, normalize(viewDir),
+				      radiusMult, bl, br, tl, tr, normalize(viewDir),
 					  oldWeight, sampleIntensity, isMovingObject, oldIdx);
 		}
 		else
 		{
-			ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, scaleFactor, 
+			ao = ssao2(IN, colors, noiseTex, samples, normal, eyeSpacePos.xyz, radiusMult, 
 			           bl, br, tl, tr, normalize(viewDir), oldWeight, sampleIntensity, 
 					   isMovingObject, normals, oldIdx);
@@ -543,5 +561,6 @@
 	}
 
-	
+#ifdef PERFORMANCE_TEST
+
 	///////////
 	//-- check if we have to reset pixel because one of the sample points was invalid
@@ -592,4 +611,11 @@
 	//OUT.illum_col.z = SqrLen(diffVec);
 
+#else
+
+	OUT.illum_col.x = ao.x;
+	OUT.illum_col.w = eyeSpaceDepth;
+	
+#endif
+
 	return OUT;
 }
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntity.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntity.cpp	(revision 3268)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SceneEntity.cpp	(revision 3331)
@@ -95,5 +95,7 @@
 
 	if (!mLODLevels.empty())
+	{
 		GetCurrentLODLevel(sit, sit_end);
+	}
 	else
 	{
@@ -104,5 +106,7 @@
 
 	for (; sit != sit_end; ++ sit)
+	{
 		(*sit)->Render(state, this);
+	}
 
 	mTransform->Unload(state);
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3327)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3331)
@@ -662,5 +662,5 @@
 	if (mShadingMethod != 0)
 	{
-		PrepareSsao(fbo); // downsample fbo buffers
+		//PrepareSsao(fbo); // downsample fbo buffers
 	}
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env	(revision 3305)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env	(revision 3331)
@@ -13,8 +13,8 @@
 #filename=mypompeii
 #bvhname=mypompeii
-#filename=pompeii/pompeii_full
+filename=pompeii/pompeii_full
 #filename=pompeii/pompeii_part
-filename=city
-bvhname=city
+#filename=city
+#bvhname=city
 useLODs=1
 # shadow map size
@@ -77,5 +77,5 @@
 camPosition=483.398f 242.364f 186.078f
 # pompeii view point
-#camPosition=1300.0f -2500.0f 10.0f
+camPosition=1300.0f -2500.0f 10.0f
 # pompeii problematic
 #camPosition=627.003 -1725.33 25.2
