Index: GTP/trunk/App/Demos/Illum/pathmap/PathMapEffect.h
===================================================================
--- GTP/trunk/App/Demos/Illum/pathmap/PathMapEffect.h	(revision 2197)
+++ GTP/trunk/App/Demos/Illum/pathmap/PathMapEffect.h	(revision 2212)
@@ -65,4 +65,7 @@
 	LPDIRECT3DTEXTURE9		radionTexture;					//!< texture containing entry point data, input for weight computation
 	LPDIRECT3DSURFACE9		radionSurface;					//!< entry point texture's surface
+
+	LPDIRECT3DTEXTURE9		aggrWeightsTexture;
+	LPDIRECT3DSURFACE9		aggrWeightsSurface;
 
 	KDTree* kdtree;		//!< the kd-tree that contains the scene geometry in raytraceable format
Index: GTP/trunk/App/Demos/Illum/pathmap/PathMap.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/pathmap/PathMap.cpp	(revision 2197)
+++ GTP/trunk/App/Demos/Illum/pathmap/PathMap.cpp	(revision 2212)
@@ -380,6 +380,9 @@
 	strcpy(prmDirectory, "prm");
 	strcpy(meshDirectory, "processedMeshes");
-	strcpy(levelFileName, "ss_ironnail.level");
-	strcpy(materialFileName, "ss_ironnail.materials");
+	strcpy(levelFileName, "space.level");
+	strcpy(materialFileName, "space.materials");
+	nClusters = 64;
+	nEntryPoints = 4096;
+	depthMapResolution = 512;
 
 	char* toki;
Index: GTP/trunk/App/Demos/Illum/pathmap/PathMapEffect.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/pathmap/PathMapEffect.cpp	(revision 2197)
+++ GTP/trunk/App/Demos/Illum/pathmap/PathMapEffect.cpp	(revision 2212)
@@ -147,5 +147,6 @@
 
 	//initialize camera
-	camera->SetViewParams( &D3DXVECTOR3(0.0f, 0.0f, 4.0f), &D3DXVECTOR3(0.0f, 0.0f, 0.0f));
+//	camera->SetViewParams( &D3DXVECTOR3(0.0f, 0.0f, 4.0f), &D3DXVECTOR3(0.0f, 0.0f, 0.0f));
+	camera->SetViewParams( &D3DXVECTOR3(0.0f, 0.0f, 0.0f), &D3DXVECTOR3(0.0f, 0.0f, 1.0f));
 	D3DSURFACE_DESC fbdesc;
 	frameColorBuffer->GetDesc(&fbdesc);
@@ -200,4 +201,8 @@
 	device->CreateTexture(4096, NRADIONS / 4096, 1, 0, D3DFMT_R32F, D3DPOOL_SYSTEMMEM, &sysMemWeightsTexture, NULL);
 	sysMemWeightsTexture->GetSurfaceLevel(0, &sysMemWeightsSurface);
+
+	//create aggr weights render target
+	device->CreateTexture(MAXNCLUSTERS, 1, 1, D3DUSAGE_RENDERTARGET, D3DFMT_R32F, D3DPOOL_DEFAULT, &aggrWeightsTexture, NULL);
+	aggrWeightsTexture->GetSurfaceLevel(0, &aggrWeightsSurface);
 
 	//create a vertex buffer to be able to visualize entry radion positions
@@ -230,4 +235,6 @@
 	weightsTexture->Release();
 	weightsSurface->Release();
+	aggrWeightsTexture->Release();
+	aggrWeightsSurface->Release();
 	radionTexture->Release();
 	radionSurface->Release();
@@ -1308,7 +1315,5 @@
 				{
 					sceneFile >> keyword;
-					strcpy(prmFileName, LC::c-this->prmDirectory);
-					strcat(prmFileName, "\\");
-					strcat(prmFileName, keyword);
+					strcpy(prmFileName, keyword);
 				}
 				if(strcmp(keyword, "mesh") == 0)
Index: GTP/trunk/App/Demos/Illum/pathmap/pathMap.fx
===================================================================
--- GTP/trunk/App/Demos/Illum/pathmap/pathMap.fx	(revision 2197)
+++ GTP/trunk/App/Demos/Illum/pathmap/pathMap.fx	(revision 2212)
@@ -122,5 +122,5 @@
 			1.0 - (input.texAtlas.y + (iCluster / prmAtlasTiles.x)) / prmAtlasTiles.y) + atlasHalfPixel;
 		float4 weight = weightsa[iCluster/4];
-//		weight = 0.001;
+//		weight = 0.065;
 		float3 val = tex2D(filteredAtlasSampler, prmTexPos);
 		col += val.xyz * weight.x;
@@ -181,4 +181,5 @@
 			1.0 - (input.texAtlas.y + (iCluster / prmAtlasTiles.x)) / prmAtlasTiles.y) + atlasHalfPixel;
 		float4 weight = weightsa[iCluster/4];
+//		weight = 0.065;
 		float3 val = tex2D(filteredAtlasSampler, prmTexPos);
 		col += val.xyz * weight.x;
@@ -201,4 +202,5 @@
 
 	return float4( lightPower * col  * tex2D(brdfMapSampler, input.tex) , 1);
+//	return float4( lightPower * col, 1);
 }
 
Index: GTP/trunk/App/Demos/Illum/pathmap/SubEntity.cpp
===================================================================
--- GTP/trunk/App/Demos/Illum/pathmap/SubEntity.cpp	(revision 2197)
+++ GTP/trunk/App/Demos/Illum/pathmap/SubEntity.cpp	(revision 2212)
@@ -274,6 +274,6 @@
 {
 	char prmFileName[300];
-	sprintf(prmFileName, "%s_%d.hdr", parent->prmFileName, subMesh->subsetId);
-	D3DXSaveSurfaceToFile(L::l+prmFileName, D3DXIFF_HDR, prmSurface, NULL, NULL);
+	sprintf(prmFileName, "%s/%s_%d.dds", LC::c-subMesh->parent->pathMapEffect->prmDirectory, parent->prmFileName, subMesh->subsetId);
+	D3DXSaveSurfaceToFile(L::l+prmFileName, D3DXIFF_DDS, prmSurface, NULL, NULL);
 }
 
@@ -281,5 +281,5 @@
 {
 	char prmFileName[300];
-	sprintf(prmFileName, "%s_%d.hdr", parent->prmFileName, subMesh->subsetId);
+	sprintf(prmFileName, "%s/%s_%d.dds", LC::c-subMesh->parent->pathMapEffect->prmDirectory, parent->prmFileName, subMesh->subsetId);
 	D3DXLoadSurfaceFromFile(prmSurface, NULL, NULL, L::l+prmFileName, NULL, D3DX_DEFAULT, 0, NULL);
 }
Index: GTP/trunk/App/Demos/Illum/pathmap/computeWeights.fx
===================================================================
--- GTP/trunk/App/Demos/Illum/pathmap/computeWeights.fx	(revision 2197)
+++ GTP/trunk/App/Demos/Illum/pathmap/computeWeights.fx	(revision 2212)
@@ -84,2 +84,29 @@
     }
 }
+/*
+float4
+	psAggregateWeights(vsOutputComputeWeights input, in int rid : VPOS) : COLOR0
+{
+	float sumWeight = 0.0;
+	float sumProb = 0.0000001;
+	
+	int iRadion = clusterStarts[rid];
+	float2 wTex = float2((iRadion / 4096 + 0.5) * dataColumnWidth,
+						 (iRadion % 4096  + 0.5) / 4096.0) );
+	while(iRadion < clusterStarts[rid+1])
+	{
+		sumWeight += tex2Dlod(weightSampler, float4(wTex, 0, 1));
+		float sumProb += 1.0;
+		wTex.y += 1.0 / 4096.0;
+	}
+	return (sumWeight / sumProb).xxxx;
+}
+
+technique AggregateWeights{
+	pass P0
+    {
+        VertexShader = compile vs_3_0 vsComputeWeights();
+        PixelShader  = compile ps_3_0 psAggregateWeights();
+    }
+}
+*/
