 	// set texture parameters
 	tex.normalized = true;                      // access with normalized texture coordinates
 	tex.filterMode = cudaFilterModeLinear;      // linear interpolation
-	tex.addressMode[0] = cudaAddressModeClamp; // we want 0s outside for beautiful isosurfaces at the borders
-	tex.addressMode[1] = cudaAddressModeClamp;
+	tex.addressMode[0] = cudaAddressModeMirror;
+	tex.addressMode[1] = cudaAddressModeMirror;
 
 	// bind array to 3D texture
 	checkCudaErrors(cudaBindTextureToArray(tex, d_volumeArray, channelDesc));

	// set texture parameters
	tex.normalized = true;                      // access with normalized texture coordinates
	tex.filterMode = cudaFilterModeLinear;      // linear interpolation
	tex.addressMode[0] = cudaAddressModeClamp; // we want 0s outside for beautiful isosurfaces at the borders
	tex.addressMode[1] = cudaAddressModeClamp;

	// bind array to 3D texture
	checkCudaErrors(cudaBindTextureToArray(tex, d_volumeArray, channelDesc));

		const float3 lightDir = make_float3(1.0f, 1.0f, 1.0f), const float4 lightParams = make_float4(0.3f, 0.5f, 0.4f, 10.0f),
		const float4 plane = make_float4(0.0f, 0.0f, 0.0f, 0.0), bool enablePlane = false) {

	const int maxSteps = 1000;
	//const float tstep = 0.0009765625f;

	const float isoVals[4] = { d_iso1, d_iso2, d_iso3, d_iso4 };
