Ray Tracing in Compute Shader

Hello,

I am trying to create a ray tracer with Image Based Lighting using the compute shader. Right now, I have implemented a simple ray tracer using the compute shader with spheres and planes created programmatically but I am rendering the ray traced image in a quad as a texture. I would like to have a 3D model and a cubemap skybox created in the scene and perform ray tracing using those so that the rays can bounce around against the mesh and the skybox.

Does anyone know how I can access the meshes and the skybox created in the scene in the compute shader?

Thank you!

You won’t be able to send 3D meshes like that to the shader. One “simple” solution would be to send the depth map of the scene (or several depth maps) to the shader, and raytrace against it.