Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.cpp	(revision 2866)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.cpp	(revision 2867)
@@ -50,5 +50,4 @@
 									 FILTER_TYPE filterType, 
 									 bool useMipMap, 
-									 bool useMultiSampling,
 									 int attachment_idx)
 {
@@ -81,16 +80,24 @@
 	glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, color_attachment[attachment_idx], GL_TEXTURE_2D, mTexId, 0);
 
-	GLuint filterParam;
+	GLuint minfilterParam;
+	GLuint magfilterParam;
 
 	switch (filterType)
 	{
 	case FILTER_NEAREST:
-		filterParam = GL_NEAREST; break;
+		minfilterParam = GL_NEAREST;
+		magfilterParam = GL_NEAREST; break;
 	case FILTER_LINEAR:
-		filterParam = GL_LINEAR; break;
+		minfilterParam = GL_LINEAR;
+		magfilterParam = GL_LINEAR; break;
 	case FILTER_MIPMAP_LINEAR: 
-		filterParam = GL_LINEAR_MIPMAP_LINEAR; break;
+		//minfilterParam = GL_LINEAR_MIPMAP_LINEAR;
+		minfilterParam = GL_NEAREST_MIPMAP_NEAREST;
+		//minfilterParam = GL_NEAREST_MIPMAP_LINEAR;
+		magfilterParam = GL_NEAREST; break;
 	default:
-		filterParam = GL_NEAREST;
+		minfilterParam = GL_NEAREST;
+		magfilterParam = GL_NEAREST;
+
 		cerr << "should not come here" << endl;
 	}
@@ -107,9 +114,11 @@
 	}
 
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filterParam);
-	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filterParam);
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, magfilterParam);
+	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, minfilterParam);
 
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, wrapParam);
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, wrapParam);
+
+	if (useMipMap) glGenerateMipmapEXT(GL_TEXTURE_2D);
 
 	// print status
@@ -178,10 +187,8 @@
 
 
-int FrameBufferObject::AddColorBuffer(int w, int h,
-									  ColorBufferObject::FORMAT col, 
+int FrameBufferObject::AddColorBuffer(ColorBufferObject::FORMAT col, 
 									  ColorBufferObject::WRAP_TYPE wrapType, 
 									  ColorBufferObject::FILTER_TYPE filterType, 
-									  bool useMipMap, 
-									  bool useMultiSampling)
+									  bool useMipMap)
 {
 	cout << "adding color buffer" << endl;
@@ -189,7 +196,8 @@
 	Bind();
 
-	int idx = (int)mColorBuffers.size();
+	const int idx = (int)mColorBuffers.size();
+
 	ColorBufferObject *colorBuf = 
-		new ColorBufferObject(w, h, col, wrapType, filterType, useMipMap, useMultiSampling, idx);
+		new ColorBufferObject(mWidth, mHeight, col, wrapType, filterType, useMipMap, idx);
 
 	mColorBuffers.push_back(colorBuf);
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Shape.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Shape.cpp	(revision 2847)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Shape.cpp	(revision 2867)
@@ -26,5 +26,6 @@
 void Shape::Render(RenderState *state)
 {
-	if (mMaterial) mMaterial->Render(state);
+	if (mMaterial) 
+		mMaterial->Render(state);
 
 	mParent->GetTransform()->Load(state);
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg	(revision 2866)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg	(revision 2867)
@@ -7,5 +7,5 @@
 
 // rule of thumb: approx 1 / NUM_SAMPLES
-#define SAMPLE_INTENSITY 0.17
+#define SAMPLE_INTENSITY 0.15
 //#define SAMPLE_INTENSITY 0.125f
 
@@ -37,5 +37,4 @@
   float2 rpt = pt - d * 2.0f * n;
 
-  //return pt;
   return rpt;
 }
@@ -80,15 +79,18 @@
 
 		//sample noisetex; r stores costheta, g stores sintheta
-		float2 mynoise = tex2D(noiseTexture, IN.texCoord.xy * noiseMultiplier).xy * 2.0f - 1.0f;
+		//float2 mynoise = tex2D(noiseTexture, IN.texCoord.xy * noiseMultiplier).xy * 2.0f - 1.0f;
+		float2 mynoise = tex2D(noiseTexture, IN.texCoord.xy * noiseMultiplier).xy;
 
 		// rotation
 		//float2 offsetTransformed = offset;
-		float2 offsetTransformed = rotate(offset, mynoise);
-		//float2 offsetTransformed = reflect(offset, noise);
+		//float2 offsetTransformed = rotate(offset, mynoise);
+		float2 offsetTransformed = reflect(offset, mynoise);
 
 		// weight with projected coordinate to reach similar kernel size for near and far
 		float2 texcoord = IN.texCoord.xy + offsetTransformed * AREA_SIZE * w;
 
-		float3 sample_position = tex2D(positions, texcoord).xyz;
+		// sample downsampled texture in order to speed up texture accesses
+		float3 sample_position = tex2Dlod(positions, float4(texcoord, 0, 1)).xyz;
+		//float3 sample_position = tex2D(positions, texcoord).xyz;
 
 		float3 vector_to_sample = sample_position - centerPosition.xyz;
@@ -112,5 +114,5 @@
 
 	return (1.0f - total_ao);
-	//return float4(dot(currentViewDir, currentNormal));
+	//return dot(currentViewDir, currentNormal);
 }
 
@@ -180,4 +182,6 @@
 
 
+/** function for standard deferred shading
+*/
 float4 shade(fragment IN, 
 			 uniform sampler2D colors,
@@ -199,9 +203,8 @@
 	float3 light2 = normalize(lightDir2.xyz);
 
-	float diffuseLight = max(dot(normal, light), 0.0f);
-	float diffuseLight2 = max(dot(normal, light2), 0.0f);
+	float diffuseLight = saturate(dot(normal, light));
+	float diffuseLight2 = saturate(dot(normal, light2));
 
 	float diffuse = diffuseLight + diffuseLight2;
-	//float diffuse = diffuseLight;
 
 	return (ambient + diffuse) * color * (1.0f - amb) + amb * color;
@@ -227,8 +230,10 @@
 
 	float4 normal = tex2D(normals, IN.texCoord.xy);
+	
+	// the ambient term
 	float amb = normal.w;
 
 	// expand normal
-	normal = normalize(normal * 2.0f - 1.0f);
+	normal = normalize(normal);// * 2.0f - 1.0f);
 	/// the current view direction
 	float3 viewDir = normalize(IN.view * 2.0f - float3(1.0f));
@@ -263,5 +268,5 @@
 	if ((tex.x >= 0.0f) && (tex.x < 1.0f) && 
 		(tex.y >= 0.0f) && (tex.y < 1.0f) && 
-		(abs(depthDif)  < 8e-5f))
+		(abs(depthDif)  < 1e-4f))
 	{
 		OUT.color = attenuated_color * expFactor + col1 * float4(1.0f - expFactor);
@@ -292,8 +297,10 @@
 
 	float4 normal = tex2D(normals, IN.texCoord.xy);
+
+	// an ambient color term
 	float amb = normal.w;
 
 	// expand normal
-	normal = normalize(normal * 2.0f - float4(1.0f));
+	normal = normalize(normal);// * 2.0f - float4(1.0f));
 
 	float4 col = shade(IN, colors, positions, normal.xyz, amb);
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg	(revision 2866)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg	(revision 2867)
@@ -77,8 +77,10 @@
 	// save color in first render target
 	pix.col = (ambient + diffuse) * tex2D(tex, IN.texCoord.xy);
+	
 	// save world position in second rt
 	pix.pos = IN.worldPos * maxDepth;
 	// save normal in third rt
-	pix.norm.xyz = IN.normal * 0.5f + 0.5f;
+	//pix.norm.xyz = IN.normal * 0.5f + 0.5f;
+	pix.norm.xyz = IN.normal;
 
 	// hack: squeeze some information about ambient into the texture
@@ -107,6 +109,7 @@
 	pix.col = diffuse;
 	pix.pos = IN.worldPos * maxDepth;
-	pix.norm.xyz = IN.normal * 0.5f + float3(0.5f);
-	// hack: squeeze some information about ambient into the texture
+	//pix.norm.xyz = IN.normal * 0.5f + float3(0.5f);
+	pix.norm.xyz = IN.normal;
+	// hack: squeeze some information about the ambient term into the target
 	pix.norm.w = ambient.x;
 	pix.pos.w = IN.mypos.w;
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg	(revision 2866)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg	(revision 2867)
@@ -10,8 +10,9 @@
 };
 
-//uniform sampler2D s_distort;
-uniform float4 e_barrier = float4(5e-5, 5e-5, 0, 0);
+// the barrier for detecting a discontinuity
+uniform float4 e_barrier = float4(5e-3, 5e-3, 0, 0); // x = normal, y = depth
+// the weights for normal / depth discontinuity
 uniform float4 e_weights = float4(1.0f, 1.0f, 1.0f, 1.0f); // x = normal, y = depth
-uniform float4 e_kernel = float4(0.3f, 1.0f, 1.0f, 1.0f); // x = normal, y = depth
+uniform float4 e_kernel = float4(0.35f, 1.0f, 1.0f, 1.0f); 
 
 
@@ -21,4 +22,5 @@
 			): COLOR
 {
+	//return tex2D(colors, IN.c.xy);
 	// normal discontinuity filter
 	float3 nc = (float3)tex2D(normals, IN.c.xy);
@@ -81,4 +83,3 @@
 
 	return (s0 + s1 + s2 + s3) / 4.0f;
-	//return float4(w);
 }
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SsaoShader.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SsaoShader.cpp	(revision 2866)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SsaoShader.cpp	(revision 2867)
@@ -64,8 +64,5 @@
 
 
-SsaoShader::SsaoShader(int w, int h, 
-					   Camera *cam,
-					   float scaleFactor
-					   ):
+SsaoShader::SsaoShader(int w, int h, Camera *cam, float scaleFactor):
 mWidth(w), mHeight(h), 
 mCamera(cam),
@@ -78,9 +75,9 @@
 	mNewFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE);
 	// the diffuse color buffer
-	mNewFbo->AddColorBuffer(w, h, ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false, false);
+	mNewFbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false);
 	
 	mOldFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE);
 	// the diffuse color buffer
-	mOldFbo->AddColorBuffer(w, h, ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false, false);
+	mOldFbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false);
 	
 
@@ -167,4 +164,26 @@
 	cgGLSetMatrixParameterfc(sOldModelViewProjMatrixParam, (const float *)oldProjViewMatrix.x);
 
+	glPushAttrib(GL_VIEWPORT_BIT);
+	glViewport(0, 0, mWidth, mHeight);
+
+	glDrawBuffers(1, mymrt);
+
+	cgGLEnableProfile(RenderState::sCgFragmentProfile);
+
+	glDisable(GL_ALPHA_TEST);
+	glDisable(GL_TEXTURE_2D);
+	glDisable(GL_LIGHTING);
+
+	glMatrixMode(GL_PROJECTION);
+	glPushMatrix();
+	glLoadIdentity();
+
+	glMatrixMode(GL_MODELVIEW);
+	glPushMatrix();
+	glLoadIdentity();
+
+	const float offs = 0.5f;
+	glOrtho(-offs, offs, -offs, offs, 0, 1);
+
 	// switch roles of old and new fbo
 	// the algorihm uses two input fbos, where the one
@@ -177,4 +196,17 @@
 	//DisplayTexture();
 	AntiAliasing(fbo);
+
+	glEnable(GL_LIGHTING);
+	glDisable(GL_TEXTURE_2D);
+
+	glMatrixMode(GL_PROJECTION);
+	glPopMatrix();
+
+	glMatrixMode(GL_MODELVIEW);
+	glPopMatrix();
+
+	glPopAttrib();
+
+	cgGLDisableProfile(RenderState::sCgFragmentProfile);
 }
 
@@ -186,32 +218,19 @@
 	GLuint normalsTex = fbo->GetColorBuffer(2)->GetTexture();
 
+	if (1)
+	{
+		// generate mip map levels for position texture
+		glBindTexture(GL_TEXTURE_2D, positionsTex);
+		glGenerateMipmapEXT(GL_TEXTURE_2D);
+	}
+
+
 	// read the second buffer, write to the first buffer
 	mNewFbo->Bind();
 	GLuint oldTex = mOldFbo->GetColorBuffer(0)->GetTexture();
 
-	glPushAttrib(GL_VIEWPORT_BIT);
-	glViewport(0, 0, mWidth, mHeight);
-
 	glDrawBuffers(1, mymrt);
 
-	glDisable(GL_ALPHA_TEST);
-	glDisable(GL_TEXTURE_2D);
-	glDisable(GL_LIGHTING);
-
-	glMatrixMode(GL_PROJECTION);
-	glPushMatrix();
-	glLoadIdentity();
-
-	glMatrixMode(GL_MODELVIEW);
-	glPushMatrix();
-	glLoadIdentity();
-
-	const float offs = 0.5f;
-
-	glOrtho(-offs, offs, -offs, offs, 0, 1);
-
 	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-	cgGLEnableProfile(RenderState::sCgFragmentProfile);
 
 	cgGLBindProgram(sCgSsaoProgram);
@@ -265,17 +284,4 @@
 	cgGLDisableTextureParameter(sOldTexParam);
 
-	cgGLDisableProfile(RenderState::sCgFragmentProfile);
-
-	glEnable(GL_LIGHTING);
-	glDisable(GL_TEXTURE_2D);
-
-	glMatrixMode(GL_PROJECTION);
-	glPopMatrix();
-
-	glMatrixMode(GL_MODELVIEW);
-	glPopMatrix();
-
-	glPopAttrib();
-
 	FrameBufferObject::Release();
 
@@ -316,5 +322,6 @@
 void SsaoShader::CreateNoiseTex2D()
 {
-	GLubyte *randomNormals = new GLubyte[mWidth * mHeight * 3];
+	//GLubyte *randomNormals = new GLubyte[mWidth * mHeight * 3];
+	float *randomNormals = new float[mWidth * mHeight * 3];
 
 	for (int i = 0; i < mWidth * mHeight * 3; i += 3)
@@ -324,6 +331,8 @@
 		const float theta = 2.0f * acos(sqrt(1.0f - rx));
 
-		randomNormals[i + 0] = (GLubyte)((cos(theta) * 0.5f + 0.5f) * 255.0f);
-		randomNormals[i + 1] = (GLubyte)((sin(theta) * 0.5f + 0.5f) * 255.0f);
+		//randomNormals[i + 0] = (GLubyte)((cos(theta) * 0.5f + 0.5f) * 255.0f);
+		//randomNormals[i + 1] = (GLubyte)((sin(theta) * 0.5f + 0.5f) * 255.0f);
+		randomNormals[i + 0] = cos(theta);
+		randomNormals[i + 1] = sin(theta);
 		randomNormals[i + 2] = 0;
 	}
@@ -338,5 +347,6 @@
 	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
 
-	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, mWidth, mHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, randomNormals);
+	//glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, mWidth, mHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, randomNormals);
+	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16F_ARB, mWidth, mHeight, 0, GL_RGB, GL_FLOAT, randomNormals);
 
 	glBindTexture(GL_TEXTURE_2D, 0);
@@ -371,23 +381,5 @@
 	GLuint colorsTex = mNewFbo->GetColorBuffer(0)->GetTexture();
 	GLuint normalsTex = fbo->GetColorBuffer(2)->GetTexture();
-
-	glPushAttrib(GL_VIEWPORT_BIT);
-	glViewport(0, 0, mWidth, mHeight);
-
-	glDisable(GL_ALPHA_TEST);
-	glDisable(GL_TEXTURE_2D);
-	glDisable(GL_LIGHTING);
-	
-	glMatrixMode(GL_PROJECTION);
-	glPushMatrix();
-	glLoadIdentity();
-
-	glMatrixMode(GL_MODELVIEW);
-	glPushMatrix();
-	glLoadIdentity();
-
-	const float offs = 0.5f;
-	
-	glOrtho(-offs, offs, -offs, offs, 0, 1);
+	
 	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
@@ -422,18 +414,5 @@
 	cgGLDisableTextureParameter(sNormalsTexAntiAliasingParam);
 
-	cgGLDisableProfile(RenderState::sCgFragmentProfile);
-	
-	glEnable(GL_LIGHTING);
-	glDisable(GL_TEXTURE_2D);
-	
-	glMatrixMode(GL_PROJECTION);
-	glPopMatrix();
-
-	glMatrixMode(GL_MODELVIEW);
-	glPopMatrix();
-
-	glPopAttrib();
-
-	PrintGLerror("deferred shading");
+	PrintGLerror("antialiasing");
 }
 
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 2866)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp	(revision 2867)
@@ -303,5 +303,7 @@
 		//env.GetIntParam(string("numSssaoSamples"), numSsaoSamples);
 
+
 		cout << "*********** parameters ***************" << endl;
+
 		cout << "assumedVisibleFrames: " << assumedVisibleFrames << endl; 
 		cout << "maxBatchSize: " << maxBatchSize << endl;
@@ -338,6 +340,8 @@
 	glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH | GLUT_MULTISAMPLE);
 	//glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH);
-
 	//glutInitDisplayString("samples=2");
+
+	SceneEntity::SetUseLODs(useLODs);
+
 
 	if (!useFullScreen)
@@ -531,13 +535,14 @@
 	// this fbo basicly stores the scene information we get from standard rendering of a frame
 	// we store colors, normals, positions (for the ssao)
-	fbo = new FrameBufferObject(texWidth, texHeight, FrameBufferObject::DEPTH_24);
+	fbo = new FrameBufferObject(texWidth, texHeight, FrameBufferObject::DEPTH_32);
 
 	// the diffuse color buffer
-	fbo->AddColorBuffer(texWidth, texHeight, ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false, false);
+	fbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, false);
 	// the positions buffer
-	fbo->AddColorBuffer(512, 512, ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, false, false);
+	fbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_MIPMAP_LINEAR, true);
+	//fbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, true);
 	// the normals buffer
-	//fbo->AddColorBuffer(ColorBufferObject::BUFFER_UBYTE, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, false, false);
-	fbo->AddColorBuffer(texWidth, texHeight, ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, false, false);
+	//fbo->AddColorBuffer(ColorBufferObject::BUFFER_UBYTE, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, false);
+	fbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST, false);
 
 	PrintGLerror("fbo");
@@ -1035,5 +1040,9 @@
 		break;
 	case '+':
-		maxBatchSize += 10;
+		if (maxBatchSize < 10)
+			maxBatchSize = 10;
+		else
+			maxBatchSize += 10;
+
 		traverser->SetMaxBatchSize(maxBatchSize);
 		break;
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredShader.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredShader.cpp	(revision 2866)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredShader.cpp	(revision 2867)
@@ -42,5 +42,5 @@
 	mFbo = new FrameBufferObject(w, h, FrameBufferObject::DEPTH_NONE);
 	// the diffuse color buffer
-	mFbo->AddColorBuffer(w, h, ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false, false);
+	mFbo->AddColorBuffer(ColorBufferObject::BUFFER_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, false);
 }
 
@@ -112,4 +112,12 @@
 	GLuint normalsTex = fbo->GetColorBuffer(2)->GetTexture();
 
+	if (1)
+	{
+		glEnable(GL_TEXTURE_2D);
+		// generate mip map levels for position texture
+		glBindTexture(GL_TEXTURE_2D, colorsTex);
+		glGenerateMipmapEXT(GL_TEXTURE_2D);
+	}
+
 	// read the second buffer, write to the first buffer
 	mFbo->Bind();
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h	(revision 2866)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/FrameBufferObject.h	(revision 2867)
@@ -25,5 +25,4 @@
 					  FILTER_TYPE filterType, 
 					  bool useMipMap, 
-					  bool useMultiSampling,
 					  int attachment_idx);
 
@@ -51,10 +50,8 @@
 		Returns the index that allows to retrieve the color buffer object.
 	*/
-	int AddColorBuffer(int w, int h,
-			           ColorBufferObject::FORMAT col, 
+	int AddColorBuffer(ColorBufferObject::FORMAT col, 
 		               ColorBufferObject::WRAP_TYPE wrapType, 
 					   ColorBufferObject::FILTER_TYPE filterType, 
-					   bool useMipMap, 
-					   bool useMultiSampling);
+					   bool useMipMap);
 
 	/** Returns the color buffer object on position i.
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env	(revision 2865)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/default.env	(revision 2867)
@@ -11,6 +11,6 @@
 camPosition=483.398f 242.364f 186.078f
 camDirection=1 0 0
-useFullScreen=0
-useLODs=0
+useFullScreen=1
+useLODs=1
 #modelPath=data/city/model/
 
