Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao3d.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao3d.cg	(revision 3167)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao3d.cg	(revision 3168)
@@ -124,13 +124,7 @@
 	pixel OUT;
 
-	float4 norm = tex2D(normals, IN.texCoord.xy);
-	
-	// the ambient term
-	//const float amb = norm.w;
-	// expand normal
-	float3 normal = normalize(norm.xyz);
+	const float3 normal = tex2D(normals, IN.texCoord.xy);
 	/// the current view direction
-	float3 viewDir;// = normalize(IN.view);
-
+	float3 viewDir = normalize(IN.view);
 	// the current world position
 	const float4 centerPosition = tex2D(positions, IN.texCoord.xy);
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/treeanimation.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/treeanimation.cg	(revision 3155)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/treeanimation.cg	(revision 3168)
@@ -99,5 +99,5 @@
 	OUT.eyePos += offs;
 
-	OUT.normal = mul(glstate.matrix.invtrans.modelview[0], IN.normal);
+	OUT.normal = normalize(mul(glstate.matrix.invtrans.modelview[0], IN.normal));
 	
 	// hack: no translational component anyway
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg	(revision 3167)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg	(revision 3168)
@@ -156,6 +156,5 @@
 	pixel OUT;
 
-	float4 norm = tex2D(normals, IN.texCoord.xy);
-	const float3 normal = normalize(norm.xyz);
+	const float3 normal = tex2D(normals, IN.texCoord.xy);
 
 	float4 color = tex2Dlod(colors, float4(IN.texCoord, 0, 0));
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg	(revision 3167)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg	(revision 3168)
@@ -180,6 +180,5 @@
 	//if (col.w < 1e10f)
 	{
-		const float eyeSpaceDepth = col.w;
-		const float distanceScaleWeight = 2.0f;
+		//const float eyeSpaceDepth = col.w; const float distanceScaleWeight = 2.0f;
 		//const float distanceScale = distanceScaleWeight / (eyeSpaceDepth + distanceScaleWeight);
 		const float distanceScale = 1.0f;
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg	(revision 3136)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg	(revision 3168)
@@ -94,5 +94,5 @@
 	// multiply with the inverse transpose of T, we multiple with 
 	// Transp(Inv(Inv(view))) = Transp(view)
-	pix.norm = mul(transpose(viewMatrix), IN.normal).xyz;
+	pix.norm = normalize(mul(transpose(viewMatrix), IN.normal).xyz);
 	//pix.norm = IN.normal.xyz;
 	// compute eye linear depth
@@ -116,5 +116,5 @@
 	// multiplying with inverse view. since transforming normal with T means to 
 	// multiply with the inverse transpose of T, we multiple with Transp(Inv(Inv(view))) = Transp(view)
-	pix.norm = mul(transpose(viewMatrix), IN.normal).xyz;
+	pix.norm = normalize(mul(transpose(viewMatrix), IN.normal).xyz);
 	//pix.norm = IN.normal.xyz;
 	// eye space depth
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg	(revision 3167)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg	(revision 3168)
@@ -80,5 +80,4 @@
 	// weight: 0 = no antialiasing, 1 = full antialiasing
 	const float w = (1.0f - de * ne) * kernel.x;
-
 	// smoothed color: the offset is big where discontinuities are
 	// (a - c) * w + c = a * w + c * (1 - w)
@@ -96,8 +95,5 @@
 	//float4 col = float4(de.x, de.x, de.x, 0);
 	//float4 col = float4(w, w, w, 0);
-	//float4 col = float4(centerNormal * 0.5f + float3(0.5f), 0);
-	//col = step(.0f, col);
-	//float4 col = float4(centerNormal, 0);
-
+	
 	// push through the current depth
 	col.w = centerDepth.x;
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/normalMapping.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/normalMapping.cg	(revision 3163)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/normalMapping.cg	(revision 3168)
@@ -124,24 +124,9 @@
 	// as it is the inverse of a rotation matrix 
 	float3x3 tangToWorldTrafo = transpose(float3x3(tangent, bitangent, normal));
-	//float3x3 tangToWorldTrafo = transpose(float3x3(bitangent, tangent, normal));
-	//float3x3 tangToWorldTrafo = transpose(float3x3(tangent, normal, bitangent));
-	//float3x3 tangToWorldTrafo = transpose(float3x3(normal, bitangent, tangent));
-	//float3x3 tangToWorldTrafo = transpose(float3x3(normal, tangent, bitangent));
-
+	
 	const float3 tangentSpaceNorm = tex2Dlod(normalMap, float4(IN.texCoord.xy, 0, 0)).xyz * 2.0f - float3(1.0f);
-	//const float3 tangentSpaceNorm = float3(0, 1, 0);
-	//const float3 tangentSpaceNorm = float3(0, 0, 1);
 	
 	pix.normal = normalize(mul(tangToWorldTrafo, tangentSpaceNorm));
-	//pix.normal = normalize(tangentSpaceNorm);
-	//pix.color.xyz = float3(abs(dot(tangent.xyz, normal.xyz)));
-	//pix.color.xyz = float3(abs(dot(bitangent.xyz, tangent.xyz)));
-	//pix.color.xyz = float3(abs(dot(normalize(IN.normal.xyz), normalize(IN.tangent.xyz))));
-	//pix.color.xyz = float3(abs(dot(IN.normal.xyz, IN.tangent.xyz)));
-	//pix.color.xyz = normal.xyz;
-	//pix.color.xyz = IN.tangent.xyz;
-	//pix.color.xyz = float3(IN.texCoord.x,0,0);
-	//pix.color.xyz = float3(0,IN.texCoord.y,0);
-	
+		
 	return pix;
 }
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg	(revision 3104)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/globillum.cg	(revision 3168)
@@ -166,6 +166,5 @@
 	pixel2 OUT;
 
-	float4 norm = tex2Dlod(normals, float4(IN.texCoord, 0 ,0));
-	float3 normal = normalize(norm.xyz);	
+	const float3 normal = tex2Dlod(normals, float4(IN.texCoord, 0 ,0));
 
 	
Index: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
===================================================================
--- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3167)
+++ GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp	(revision 3168)
@@ -519,5 +519,5 @@
 
 	// antialiasing of the color buffer
-	AntiAliasing(fbo, light);
+	//AntiAliasing(fbo, light);
 
 	switch (mShadingMethod)
@@ -546,8 +546,8 @@
 	// as multisampling is difficult / costly with deferred shading, 
 	// at least do some antialiasing
-	AntiAliasing(fbo, light);
+	//AntiAliasing(fbo, light);
 
 	// just output the latest buffer
-	//Output(fbo);
+	Output(fbo);
 
 	glEnable(GL_LIGHTING);
