 		auto lightobj = sampleres.obj;
 
 		auto dirToLight = normalize(sampleres.dir);
-		shadowRays[idx] = ray(path.rec.p, dirToLight);
 
 		auto cosShadow = dot(orienting_normal, dirToLight);
 

#include "aten4idaten.h"

struct ray : public aten::ray {
	AT_DEVICE_API ray() : aten::ray()
	{
		isActive = true;
	}
	AT_DEVICE_API ray(const aten::vec3& o, const aten::vec3& d) : aten::ray(o, d)
	{
		isActive = true;
	}

	struct {
		uint32_t isActive : 1;

	aten::vec3 contrib;
	aten::hitrecord rec;
	aten::sampler sampler;
	
	int mtrlid;

	real pdfb;

	bool isHit;
	bool isTerminate;
};
//AT_STATICASSERT((sizeof(Path) % 64) == 0);

__global__ void genPath(
	Path* paths,
