 				m_primparams.ptr(),
 				texVtxPos, texVtxNml,
 				m_mtxparams.ptr(),
-				m_tex.ptr());
+				m_tex.ptr(),
+				m_random.ptr());
 		}
 		else {
 			shade<false> << <blockPerGrid, threadPerBlock >> > (


	auto& path = paths[idx];
	const auto& ray = rays[idx];

	aten::hitrecord rec;


	cudaTextureObject_t vtxPos,
	cudaTextureObject_t vtxNml,
	const aten::mat4* __restrict__ matrices,
	cudaTextureObject_t* textures,
	unsigned int* random)
{
	int idx = blockIdx.x * blockDim.x + threadIdx.x;

