 		thrust::device_vector<uint>  & cellEnd,
 		uint numAllMarkers,
 		uint numCells) {
-	//#if USE_TEX
-	//    cutilSafeCall(cudaBindTexture(0, oldPosTex, sortedPosRad, numAllMarkers*sizeof(Real4)));
-	//    cutilSafeCall(cudaBindTexture(0, oldVelTex, sortedVelMas, numAllMarkers*sizeof(Real4)));
-	//    cutilSafeCall(cudaBindTexture(0, cellStartTex, cellStart, numCells*sizeof(uint)));
-	//    cutilSafeCall(cudaBindTexture(0, cellEndTex, cellEnd, numCells*sizeof(uint)));    
-	//#endif
 
 	// thread per particle
 	uint numThreads, numBlocks;

				Real d = length(dist3);
				if (d > RESOLUTION_LENGTH_MULT * paramsD.HSML) continue;
				Real4 rhoPresMuB = FETCH(sortedRhoPreMu, j);
				if (!( rhoPresMuA.w <0 && rhoPresMuB.w < 0 )) continue;//# A and B must be fluid, accoring to colagrossi (2003), the other phase (i.e. rigid) should not be considered)
				Real multRho = 2.0f / (rhoPresMuA.x + rhoPresMuB.x);
				Real4 velMasB = FETCH(sortedVelMas, j);
				deltaV += velMasB.w * mR3(velMasB - velMasA) * W3(d) * multRho;

	if (index >= numAllMarkers) return;

	// read particle data from sorted arrays

	real4 rhoPreMuA = FETCH(sortedRhoPreMu, index);
	if (rhoPreMuA.w > -0.1) { // v_XSPH is calculated only for fluid markers. Keep unchanged if not fluid.
		vel_XSPH_Sorted_D[index] = R3(velMasA);
		return;
	}

	Real3 posRadA = FETCH(sortedPosRad, index);
	Real4 velMasA = FETCH(sortedVelMas, index);
	Real3 deltaV = mR3(0);

	// get address in grid
