 	auto r2 = sampler->nextSample();
 	float2 jitter = make_float2(r1, r2);
 
-	auto tmp = sampleColor(curAovs, width, height, p);
+	auto tmp = sampleColorRGB(curAovs, width, height, p);
 
 	auto clr0 = sampleColor(curAovs, width, height, p, jitter);
 

#include "cuda/cudamemory.h"

#include "aten4idaten.h"

inline __device__ float3 clipAABB(
	float3 aabb_min,

	cmax = 0.5 * (cmax + cmax5);
	cavg = 0.5 * (cavg + cavg5);

#ifdef ENABLE_YCOCG
	auto ex = 0.25 * 0.5 * (cmax.x - cmin.x);
	float2 chroma_extent = make_float2(ex, ex);
	float2 chroma_center = make_float2(clr0.y, clr0.z);
	
	cmin.y = chroma_center.x - chroma_extent.x;
	cmin.z = chroma_center.y - chroma_extent.y;

	cmax.y = chroma_center.x + chroma_extent.x;
	cmax.z = chroma_center.y + chroma_extent.y;

	cavg.y = chroma_center.x;
	cavg.z = chroma_center.y;
#endif

	auto ret = clipAABB(cmin, cmax, clr1);

	return ret;
}
