 	// Make next ray.
 	rays[idx] = aten::ray(rec.p, nextDir);
 
-	path.mtrlid = rec.mtrlid;
 	path.pdfb = pdfb;
+	path.isSingular = mtrl->attrib.isSingular;
 }
 
 __global__ void hitShadowRay(

	rays[idx] = camsample.r;

	path.throughput = aten::make_float3(1);
	path.mtrlid = -1;
	path.pdfb = 0.0f;
	path.isHit = false;
	path.isTerminate = false;

	// Accumulate value, so do not reset.
	//path.contrib = aten::make_float3(0);

	aten::Intersection isect;
	aten::sampler sampler;
	
	real pdfb;

	bool isHit;
	bool isTerminate;
	bool isSingular;
};

#define BLOCK_SIZE	(16)
