Replaced the ray structure with a ray buffer located in the shared memory