Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.cpp	(revision 3204)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.cpp	(revision 3332)
@@ -116,4 +116,6 @@
 	case RGBA_FLOAT_32: 
 		mGlFormat = GL_FLOAT; mInternalFormat = GL_RGBA32F_ARB; break;
+	case R_FLOAT_32: 
+		//mGlFormat = GL_FLOAT; mInternalFormat = GL_R32F_ARB; break;
 	default:
 		mGlFormat = GL_UNSIGNED_BYTE; mInternalFormat = GL_RGBA8;
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg	(revision 3328)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg	(revision 3332)
@@ -338,4 +338,6 @@
 	const float3 normal = normalize(tex2Dlod(normalsTex, float4(IN.texCoord, 0, 0)).xyz);
 
+//#ifdef PERFORMANCE_TEST
+#if 1
 	// do reprojection and filter out the pixels that are not save
 	const float2 pValid = PixelValid(oldTex,
@@ -350,4 +352,7 @@
 									 myTex
 									 );
+#else
+	const float2 pValid = float2(0,0);
+#endif
 
 	pix.color = color;
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg	(revision 3295)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg	(revision 3332)
@@ -34,4 +34,5 @@
 	return rpt;
 }
+
 
 struct GiStruct
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3331)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3332)
@@ -285,4 +285,5 @@
 static void UpdateSampleTex(Sample2 *samples, int numSamples)
 {
+	PrintGLerror("here4");
 	glEnable(GL_TEXTURE_2D);
 	glBindTexture(GL_TEXTURE_2D, sampleTex2D);
@@ -297,10 +298,9 @@
 		tempBuffer[i * 3 + 1] = samples[i].y;
 		tempBuffer[i * 3 + 2] = 0;
-		
 	}
 
 	glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, w, h, GL_RGB, GL_FLOAT, (float *)tempBuffer);
 
-	glBindTexture(GL_TEXTURE_2D, 0);
+	//glBindTexture(GL_TEXTURE_2D, 0);
 	glDisable(GL_TEXTURE_2D);
 
@@ -309,5 +309,5 @@
 	delete [] tempBuffer;
 
-	PrintGLerror("noisetexture");
+	PrintGLerror("update sample tex");
 }
 
@@ -333,5 +333,4 @@
 		tempBuffer[i * 3 + 1] = samples[i].y;
 		tempBuffer[i * 3 + 2] = 0;
-		
 	}
 
@@ -345,5 +344,5 @@
 	delete [] tempBuffer;
 
-	PrintGLerror("noisetexture");
+	PrintGLerror("create sample tex");
 }
 
@@ -420,5 +419,5 @@
 	for (int i = 0; i < 4; ++ i)
 	{
-		mIllumFbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR);
+		mIllumFbo->AddColorBuffer(ColorBufferObject::R_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR);
 		FrameBufferObject::InitBuffer(mIllumFbo, i);
 	}
@@ -662,5 +661,5 @@
 	if (mShadingMethod != 0)
 	{
-		//PrepareSsao(fbo); // downsample fbo buffers
+		PrepareSsao(fbo); // downsample fbo buffers
 	}
 
@@ -798,4 +797,6 @@
 void DeferredRenderer::ComputeSsao(FrameBufferObject *fbo, float tempCohFactor)
 {
+	PrintGLerror("here5");
+
 	GLuint colorsTex, normalsTex, attribsTex;
 
@@ -813,4 +814,5 @@
 	attribsTex = fbo->GetColorBuffer(2)->GetTexture();
 
+	PrintGLerror("here6");
 
 	/////////
@@ -819,10 +821,16 @@
 	GLuint oldSsaoTex = mIllumFbo->GetColorBuffer(2 - mIllumFboIndex)->GetTexture();
 
+	PrintGLerror("here809");
+
 	glPushAttrib(GL_VIEWPORT_BIT);
 	glViewport(0, 0, mIllumFbo->GetWidth(), mIllumFbo->GetHeight());
+
+	PrintGLerror("here45");
 
 	// read the second buffer, write to the first buffer
 	mIllumFbo->Bind();
 	glDrawBuffers(2, mrt + mIllumFboIndex);
+
+	PrintGLerror("here8");
 
 	int i = 0;
@@ -861,16 +869,4 @@
 
 	sCgSsaoProgram->SetTexture(i, sampleTex2D);
-
-	static int dummycount = 0;
-
-	if (0)//dummycount ++ % 1000 == 0)
-	{
-		float *data = GrabTexture(sampleTex2D, NUM_PRECOMPUTED_SAMPLES, 1);
-		cout << "********************************" << endl;
-		for (int i = 0; i < NUM_PRECOMPUTED_SAMPLES; ++ i)
-			cout << data[i] << " ";
-		cout << endl;
-		delete [] data;
-	}
 
 	++ i;
Index: /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h
===================================================================
--- /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h	(revision 3204)
+++ /GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h	(revision 3332)
@@ -15,5 +15,5 @@
 public:
 
-	enum FORMAT {RGB_UBYTE, RGBA_UBYTE, RGB_FLOAT_16, RGBA_FLOAT_16, RGB_FLOAT_32, RGBA_FLOAT_32};
+	enum FORMAT {RGB_UBYTE, RGBA_UBYTE, RGB_FLOAT_16, RGBA_FLOAT_16, RGB_FLOAT_32, RGBA_FLOAT_32, R_FLOAT_32};
 	enum WRAP_TYPE {WRAP_REPEAT, WRAP_CLAMP_TO_EDGE, WRAP_CLAMP_TO_BORDER};
 	enum FILTER_TYPE {FILTER_NEAREST, FILTER_LINEAR};
