Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h	(revision 3195)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h	(revision 3196)
@@ -12,8 +12,8 @@
 // for quadratic falloff
 //#define SAMPLE_INTENSITY 0.9f
-#define SAMPLE_INTENSITY 2.0f
+//#define SAMPLE_INTENSITY 2.0f
 
 //#define SAMPLE_INTENSITY 0.075f
-//#define SAMPLE_INTENSITY 0.2f
+#define SAMPLE_INTENSITY 0.2f
 
 #define SAMPLE_RADIUS 8e-1f
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg	(revision 3195)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg	(revision 3196)
@@ -296,6 +296,5 @@
 	pixel pix;
 
-	//const float3 normal = normalize(tex2Dlod(normalsTex, float4(IN.texCoord, 0 ,0)).xyz);
-	const float3 normal = tex2Dlod(normalsTex, float4(IN.texCoord, 0 ,0)).xyz;
+	const float3 normal = normalize(tex2Dlod(normalsTex, float4(IN.texCoord, 0 ,0)).xyz);
 	const float3 difVec = tex2Dlod(diffVals, float4(IN.texCoord, 0 ,0)).xyz;
 
@@ -305,12 +304,13 @@
 	
 	float4 dummy;
-	const float xoffs = .5f / 1024.0f;
-	const float yoffs = .5f / 768.0f;
-
-	dummy.x = tex2Dlod(colorsTex, float4(IN.texCoord + float2(xoffs, 0), 0, 0)).w;
-	dummy.y = tex2Dlod(colorsTex, float4(IN.texCoord + float2(0, yoffs), 0, 0)).w;
-	dummy.z = tex2Dlod(colorsTex, float4(IN.texCoord + float2(-xoffs, 0), 0, 0)).w;
-	dummy.w = tex2Dlod(colorsTex, float4(IN.texCoord + float2(0, -yoffs), 0, 0)).w;
-	color.w =  max(max(dummy.x, dummy.y), max(dummy.z, dummy.w));
+	//const float xoffs = .5f / 1024.0f; const float yoffs = .5f / 768.0f;
+	const float xoffs = 1.0f / 1024.0f; const float yoffs = 1.0f / 768.0f;
+
+	dummy.x = tex2Dlod(colorsTex, float4(IN.texCoord + float2(xoffs, yoffs), 0, 0)).w;
+	dummy.y = tex2Dlod(colorsTex, float4(IN.texCoord + float2(xoffs, -yoffs), 0, 0)).w;
+	dummy.z = tex2Dlod(colorsTex, float4(IN.texCoord + float2(-xoffs, yoffs), 0, 0)).w;
+	dummy.w = tex2Dlod(colorsTex, float4(IN.texCoord + float2(-yoffs, -yoffs), 0, 0)).w;
+	//color.w = min(min(dummy.x, dummy.y), min(dummy.z, dummy.w));
+	//color.w = max(max(dummy.x, dummy.y), max(dummy.z, dummy.w));
 	
 	// store scaled view vector so wie don't have to normalize for e.g., ssao
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg	(revision 3195)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg	(revision 3196)
@@ -179,12 +179,17 @@
 
 	float4 dummy;
-	const float xoffs = .5f / 1024.0f;
-	const float yoffs = .5f / 768.0f;
-
-	dummy.x = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(xoffs, 0), 0, 0)).y;
+	//const float xoffs = .5f / 1024.0f;	const float yoffs = .5f / 768.0f;
+	const float xoffs = 1.0f / 1024.0f;	const float yoffs = 1.0f / 768.0f;
+
+	dummy.x = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(xoffs, yoffs), 0, 0)).w;
+	dummy.y = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(xoffs, -yoffs), 0, 0)).w;
+	dummy.z = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(-xoffs, yoffs), 0, 0)).w;
+	dummy.w = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(-yoffs, -yoffs), 0, 0)).w;
+
+	/*dummy.x = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(xoffs, 0), 0, 0)).y;
 	dummy.y = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(0, yoffs), 0, 0)).y;
 	dummy.z = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(-xoffs, 0), 0, 0)).y;
 	dummy.w = tex2Dlod(ssaoTex, float4(IN.texCoord + float2(0, -yoffs), 0, 0)).y;
-
+*/
 	const float convergence = min(min(dummy.x, dummy.y), min(dummy.z, dummy.w));
 	//const float convergence = max(max(dummy.x, dummy.y), max(dummy.z, dummy.w));
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg	(revision 3195)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg	(revision 3196)
@@ -300,5 +300,6 @@
 		// the distance_scale offset is used to avoid singularity that occurs at global illumination when 
 		// the distance to a sample approaches zero
-		const float aoContrib = SAMPLE_INTENSITY / (DISTANCE_SCALE + lengthToSample * lengthToSample);
+		//const float aoContrib = SAMPLE_INTENSITY / (DISTANCE_SCALE + lengthToSample * lengthToSample);
+		const float aoContrib = SAMPLE_INTENSITY / max(1e-1f, lengthToSample * lengthToSample);
 		//const float aoContrib = (1.0f > lengthToSample) ? occlusionPower(9e-2f, DISTANCE_SCALE + lengthToSample): .0f;
 
