Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h	(revision 3160)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h	(revision 3161)
@@ -6,10 +6,11 @@
 //-- ssao + gi parameters
 
-#define NUM_SAMPLES 8
 //#define NUM_SAMPLES 8
+#define NUM_SAMPLES 48
 
 // for quadratic falloff
 //#define SAMPLE_INTENSITY 0.2f
 #define SAMPLE_INTENSITY 0.07f
+//#define SAMPLE_INTENSITY 0.005f
 
 //#define SAMPLE_INTENSITY 0.075f
@@ -60,6 +61,6 @@
 
 //#define NUM_SSAO_FILTERSAMPLES 25
-#define NUM_SSAO_FILTERSAMPLES 16
-//#define NUM_SSAO_FILTERSAMPLES 81
+#define NUM_SSAO_FILTERSAMPLES 8
+//#define NUM_SSAO_FILTERSAMPLES 80
 
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg	(revision 3160)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg	(revision 3161)
@@ -100,20 +100,25 @@
 
 	// reconstruct position from the eye space depth
-	const float eyeSpaceDepth = col.w;
-	const float4 worldPos = float4(-IN.view * eyeSpaceDepth, 1.0f);
+	/*const float4 worldPos = float4(-IN.view * eyeSpaceDepth, 1.0f);
 	// compute w factor from projection in order to control filter size
 	const float4 projPos = mul(modelViewProj, worldPos);
 	const float distanceScale = 1.0f / projPos.w;
+*/
+
+	const float eyeSpaceDepth = col.w;
+
+	const float scaleFactor = 2.0f;
+	const float distanceScale = scaleFactor / (eyeSpaceDepth + scaleFactor);
 
 	const float convergence = ao.y;
+
+	const float adaptFactor = 5.0f;
+	const float convergenceScale = adaptFactor / (convergence + adaptFactor);
+
 
 	if ((ao.y < 100.0f) && (col.w < 1e10f))
 	//if (col.w < 1e10f)
 	{
-		const float scaleFactor = 1.0f;
-		const float adaptFactor = 5.0f;
-		const float scale =	adaptFactor * scaleFactor * distanceScale / (adaptFactor + convergence);
-
-		ao.x = DiscontinuityFilter(IN.texCoord, ao, col, ssaoTex, normalsTex, colorsTex, filterOffs, filterWeights, scale);
+		ao.x = DiscontinuityFilter(IN.texCoord, ao, col, ssaoTex, normalsTex, colorsTex, filterOffs, filterWeights, convergenceScale * distanceScale);
 	}
 
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg	(revision 3159)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg	(revision 3161)
@@ -153,6 +153,6 @@
 		{		
 			newWeight = 4.0f;
+			//newWeight = 1.0f;
 		}
-		//if (pixelValid > 1.0f) newWeight = max(15.0f - notValid * 2.0f, 1.0f);
 	}
 	else
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3160)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3161)
@@ -456,4 +456,5 @@
 	const float filterWidth = 100.0f;
 	//const float filterWidth = 200.0f;
+	//const float filterWidth = 50.0f;
 
 	PoissonDiscSampleGenerator2 poisson(NUM_SSAO_FILTERSAMPLES, 1.0f);
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/VboFormatConverter/VboFormatConverter.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/VboFormatConverter/VboFormatConverter.cpp	(revision 3155)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/VboFormatConverter/VboFormatConverter.cpp	(revision 3161)
@@ -118,6 +118,4 @@
 		geom->mTexcoords[line].second = 1.0f - tex.second;
 
-		static int dummy = 0;
-		if (dummy ++ < 5) cout << "tangent: " << geom->mTangents[line] << endl;
 		++ line;
 	}
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter.cpp	(revision 3146)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/Converter/ObjConverter.cpp	(revision 3161)
@@ -172,5 +172,5 @@
 	for (int i = 0; i < numElements; ++ i)
 	{
-#if 1
+#if 0
 		// convert to our camera system: change y and z
 		geom->mVertices[i].x = faceVertices[i].x;
@@ -279,5 +279,6 @@
 				default:
 					sscanf(str + 1, "%f %f %f", &x, &y, &z);
-					const float scale = 5e-3f;
+					//const float scale = 5e-3f;
+					const float scale = 1.0f;
 					vertices.push_back(SimpleVec(x * scale, y * scale, z* scale));
 					//cout <<"v " << x << " " << y << " "<< z << " ";
@@ -390,5 +391,6 @@
 
 		ambient.x = ambient.y = ambient.z = 0.2f;
-		diffuse.x = diffuse.y = diffuse.z = 1.0f;
+		//diffuse.x = diffuse.y = diffuse.z = 1.0f;
+		diffuse.x = 0.7f; diffuse.y = 0.5f; diffuse.z = 0.2f;
 		spec.x    = spec.y    = spec.z    =  .0f;
 		emm = spec;
