Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h	(revision 3295)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h	(revision 3297)
@@ -8,6 +8,6 @@
 //#define NUM_SAMPLES 8
 //#define NUM_SAMPLES 16
-//#define NUM_SAMPLES 24
-#define NUM_SAMPLES 48
+#define NUM_SAMPLES 24
+//#define NUM_SAMPLES 48
 
 #define MIN_SAMPLES 8
@@ -20,5 +20,7 @@
 #define VIEW_CORRECTION_SCALE 1.0f
 
-#define NUM_SSAO_FILTER_SAMPLES 16
+//#define NUM_SSAO_FILTER_SAMPLES 13 // 7x7
+#define NUM_SSAO_FILTER_SAMPLES 9
+//#define NUM_SSAO_FILTER_SAMPLES 5
 
 #define SSAO_CONVERGENCE_THRESHOLD 700.0f
@@ -62,5 +64,5 @@
 #define NUM_DOF_TABS 16
 
-#define USE_GTX
+//#define USE_GTX
 
 #endif // __SHADERENV_H
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg	(revision 3296)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg	(revision 3297)
@@ -69,5 +69,6 @@
 		//samplePos = ReconstructSamplePos(ssaoTex, sampleTexCoord.xy, bl, br, tl, tr);
 
-		len = min(SqrLen(centerPos - samplePos), 1e2f);
+		len = SqrLen(centerPos - samplePos);
+		//len = length(centerPos - samplePos);
 		spatialFactor = 1.0f / max(len, 1e-3f);
 
@@ -144,5 +145,6 @@
 
 	// filter up to a certain convergance value and leave out background (sky) by checking depth
-	if ((convergence < SSAO_CONVERGENCE_THRESHOLD) && (col.w < 1e10f))
+	if (//(convergence < SSAO_CONVERGENCE_THRESHOLD) &&
+		(col.w < 1e10f))
 	{
 		const float distanceScale = 1.0f;
@@ -151,5 +153,5 @@
 		const float convergenceWeight = SSAO_CONVERGENCE_THRESHOLD / (ssaoFilterRadius - 1.0f);
 		const float convergenceScale = convergenceWeight / (convergence + convergenceWeight);
-		const float scale = ssaoFilterRadius * convergenceScale * distanceScale;
+		const float scale = 1;//ssaoFilterRadius * convergenceScale * distanceScale;
 
 		// the filtered ssao value
@@ -221,5 +223,5 @@
 		const float convergenceWeight = SSAO_CONVERGENCE_THRESHOLD / (ssaoFilterRadius - 1.0f);
 		const float convergenceScale = convergenceWeight / (convergence + convergenceWeight);
-		const float scale = ssaoFilterRadius * convergenceScale * distanceScale;
+		const float scale = 1;//ssaoFilterRadius * convergenceScale * distanceScale;
 
 		// the filtered ssao value
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 3295)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 3297)
@@ -625,5 +625,5 @@
 	if (0) LoadPompeiiFloor();
 
-#if 0
+#if 1
 	const Vector3 sceneCenter(470.398f, 240.364f, 181.7f);
 	//const Vector3 sceneCenter(470.398f, 240.364f, 180.3);
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3296)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3297)
@@ -652,4 +652,6 @@
 #else
 
+/** star filter
+*/
 void DeferredRenderer::PrepareSsaoFilter()
 {
@@ -662,25 +664,43 @@
 	const float yoffs = (float)filterWidth / mHeight;
 
-	for (int i = 0; i < NUM_SSAO_FILTER_SAMPLES / 2; ++ i)
-	{
-		float x = xoffs * (i - NUM_SSAO_FILTER_SAMPLES / 4);
-		float y = 0;
+	const int n = NUM_SSAO_FILTER_SAMPLES / 2 + 1;
+
+	for (int i = 0; i < n; ++ i)
+	{
+		const int idx = i - NUM_SSAO_FILTER_SAMPLES / 4;
+
+		const float x = xoffs * (float)idx;
+		const float y = 0;
 
 		ssaoFilterWeights[i] = GaussianDistribution(x, y, 1.0f);
 		
-		ssaoFilterOffsets[2 * i + 0] = xoffs;
-		ssaoFilterOffsets[2 * i + 1] = yoffs;
-	}
-
-	for (int i = 0; i < NUM_SSAO_FILTER_SAMPLES / 2; ++ i)
-	{
-		float x = 0;
-		float y = yoffs * (i - NUM_SSAO_FILTER_SAMPLES / 4);
-
-		ssaoFilterWeights[i] = GaussianDistribution(x, y, 1.0f);
-		//ssaoFilterWeights[i] = 1.0f;
-
-		ssaoFilterOffsets[2 * (NUM_SSAO_FILTER_SAMPLES / 2 + i) + 0] *= xoffs;
-		ssaoFilterOffsets[2 * (NUM_SSAO_FILTER_SAMPLES / 2 + i) + 1] *= yoffs;
+		ssaoFilterOffsets[2 * i + 0] = x;
+		ssaoFilterOffsets[2 * i + 1] = y;
+	}
+
+	int j = 2 * n;
+
+	for (int i = 0; i < n; ++ i)
+	{ 
+		const int idx = i - NUM_SSAO_FILTER_SAMPLES / 4;
+
+		if (idx)
+		{
+			const float x = 0;
+			const float y = yoffs * (float)idx;
+
+			ssaoFilterWeights[i] = GaussianDistribution(x, y, 1.0f);
+			//ssaoFilterWeights[i] = 1.0f;
+			
+			ssaoFilterOffsets[j + 0] = x;
+			ssaoFilterOffsets[j + 1] = y;
+
+			j += 2;
+		}
+	}
+
+	for (int i = 0; i < NUM_SSAO_FILTER_SAMPLES; ++ i)
+	{
+		cout << "samples " << i << ": " << ssaoFilterOffsets[i * 2] << " " << ssaoFilterOffsets[i * 2 + 1] << endl;
 	}
 }
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env	(revision 3292)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env	(revision 3297)
@@ -107,5 +107,5 @@
 useFullScreen=0
 
-# the used render method (forward, forward + depth pass, deferred, deferred + depth pass
+# the used render method (forward, forward + depth pass, deferred, deferred + depth pass)
 #renderMethod=2
 renderMethod=0
