 			}
 		}
 		
-		if (minDepth < INT_MAX_VALUE)
-		{
-			float color = ((float)minDepth) / ((float)INT_MAX_VALUE);
+		if (minDepth < INT_MAX)
+		{
+			float color = ((float)minDepth) / ((float)INT_MAX);
 			shadowMap[index] = color;
 		}
 	}

			}
		}
		
		if (minDepth < INT_MAX_VALUE)
		{
			float4 color = make_float4(0.f, 0.f, 0.f, 0.f);			


	float diffusePower
)
{
	unsigned index = blockIdx.x * blockDim.x + threadIdx.x, index2;
	unsigned minDepth = INT_MAX;
	unsigned depth;
	int startIndex, curIndex, x, y;
	VoxelData vd, minVd;

