Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h	(revision 3298)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h	(revision 3299)
@@ -66,3 +66,5 @@
 #define USE_GTX
 
+#define SSAO_FILTER_RADIUS 3
+
 #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 3298)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg	(revision 3299)
@@ -107,6 +107,5 @@
 						 uniform float3 tl,
 						 uniform float3 tr,
-						 uniform float w,
-						 uniform float h
+						 uniform float2 resolution
 						 )
 {
@@ -200,6 +199,5 @@
 						 uniform float3 tl,
 						 uniform float3 tr,
-						 uniform float w,
-						 uniform float h
+						 uniform float2 resolution
 						 )
 {
@@ -233,8 +231,12 @@
 	// just apply ssao if we are not in the sky
 	if (col.w < 1e10f)
+	{
 		OUT.illum_col.xyz = col.xyz * max(2e-2f, 1.0f - ao.x);
 		//OUT.illum_col.xyz = col.xyz * ao.x;
+	}
 	else
+	{
 		OUT.illum_col.xyz = col.xyz;
+	}
 
 	OUT.illum_col.w = col.w;
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3297)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3299)
@@ -396,5 +396,5 @@
 	sCgCombineIllumProgram = sm->CreateFragmentProgram("globillum", "combine", "CombineGi");
 	//sCgCombineSsaoProgram = sm->CreateFragmentProgram("combineSsao", "CombineSsaoHalfRes", "CombineSsao");
-	sCgCombineSsaoProgram = sm->CreateFragmentProgram("combineSsao", "CombineSsaoFullRes", "CombineSsao");
+	sCgCombineSsaoProgram = sm->CreateFragmentProgram("combineSsaoSep", "CombineSsaoFullRes", "CombineSsao");
 	sCgAntiAliasingProgram = sm->CreateFragmentProgram("antialiasing", "main", "AntiAliasing");
 	sCgToneProgram = sm->CreateFragmentProgram("tonemap", "ToneMap", "ToneMap");
@@ -443,10 +443,15 @@
 	////////////////
 
-	string combineSsaoParams[] = 
+	/*string combineSsaoParams[] = 
 		{"colorsTex", "normalsTex", "ssaoTex", "filterOffs", "filterWeights", 
 		"ssaoFilterRadius", "modelViewProj", "bl", "br", "tl", 
 		"tr", "w", "h"};
-
-	sCgCombineSsaoProgram->AddParameters(combineSsaoParams, 0, 13);
+	*/
+	string combineSsaoParams[] = 
+		{"colorsTex", "ssaoTex", "bl", "br", "tl", "tr", "xyStep"};
+
+	//sCgCombineSsaoProgram->AddParameters(combineSsaoParams, 0, 13);
+	sCgCombineSsaoProgram->AddParameters(combineSsaoParams, 0, 7);
+
 
 	//////////////
@@ -1033,12 +1038,11 @@
 
 	sCgCombineSsaoProgram->SetTexture(i ++, colorsTex);
-	sCgCombineSsaoProgram->SetTexture(i ++, normalsTex);
 	sCgCombineSsaoProgram->SetTexture(i ++, ssaoTex);
 
-	sCgCombineSsaoProgram->SetArray2f(i ++, (float *)ssaoFilterOffsets, NUM_SSAO_FILTER_SAMPLES);
-	sCgCombineSsaoProgram->SetArray1f(i ++, (float *)ssaoFilterWeights, NUM_SSAO_FILTER_SAMPLES);
-	sCgCombineSsaoProgram->SetValue1f(i ++, mSsaoFilterRadius);
-
-	sCgCombineSsaoProgram->SetMatrix(i++, mProjViewMatrix);
+	//sCgCombineSsaoProgram->SetArray2f(i ++, (float *)ssaoFilterOffsets, NUM_SSAO_FILTER_SAMPLES);
+	//sCgCombineSsaoProgram->SetArray1f(i ++, (float *)ssaoFilterWeights, NUM_SSAO_FILTER_SAMPLES);
+	//sCgCombineSsaoProgram->SetValue1f(i ++, mSsaoFilterRadius);
+
+	//sCgCombineSsaoProgram->SetMatrix(i++, mProjViewMatrix);
 
 	for (int j = 0; j < 4; ++ j, ++ i)
@@ -1047,6 +1051,6 @@
 	}
 
-	sCgCombineSsaoProgram->SetValue1f(i ++, mIllumFbo->GetColorBuffer(mIllumFboIndex)->GetWidth());
-	sCgCombineSsaoProgram->SetValue1f(i ++, mIllumFbo->GetColorBuffer(mIllumFboIndex)->GetHeight());
+	//sCgCombineSsaoProgram->SetValue2f(i ++, 1.0f / (float)mWidth, 1.0f / (float)mHeight);
+	sCgCombineSsaoProgram->SetValue2f(i ++, 1.0f / (float)mWidth, 0);
 
 	DrawQuad(sCgCombineSsaoProgram);
