Merged kernels for path tracing and setting the pixel color.