 	cudaBindTexture
 	(
 		(size_t *) 0,
-		_depthBuffer,
+		tDepthBuffer,
 		(void *) thrust::raw_pointer_cast( m_depthBuffer.data() ),
-		_depthBufferDesc,
+		cudaCreateChannelDesc< unsigned >(),
 		(size_t) ( resolution() * sizeof( unsigned int ) )
 	);
 	if( shadowPass )

				intensity = powf(fmaxf(0.f, d_vecDot(tempv, minVd.normal)), 32.f); 
				if (intensity > 0.f)
				{
					tempf = tex2D(_spec, minVd.texCoord.x, minVd.texCoord.y);
					color.x += diffusePower * intensity * tempf.x;
					color.y += diffusePower * intensity * tempf.y;
					color.z += diffusePower * intensity * tempf.z;

			if (minVd.center.z <= shadowMap[index2] + 0.01f) //not in shadow		
			{
				//normal mapping
				tempf = tex2D(tNormal, minVd.texCoord.x, minVd.texCoord.y);
				Vector3 tempv = d_vecCross(minVd.normal, minVd.tangent);
				minVd.normal = d_vecNormalize(d_vecAddVec(d_vecMulS(minVd.normal, tempf.z),
											  d_vecAddVec(d_vecMulS(minVd.tangent, tempf.x),
														  d_vecMulS(tempv, tempf.y))));
				
				tempf = tex2D(tIllum, minVd.texCoord.x, minVd.texCoord.y);				
				float intensity = fmaxf(0.f, d_vecDot(minVd.normal, light));				
				if (intensity > 0.f || diffusePower < 1.f)
				{					
					color = tex2D(tDiffuse, minVd.texCoord.x, minVd.texCoord.y);
					color.x *= intensity * diffusePower + tempf.x + 1.0f - diffusePower;
					color.y *= intensity * diffusePower + tempf.y + 1.0f - diffusePower;
					color.z *= intensity * diffusePower + tempf.z + 1.0f - diffusePower;
