I'm a noobie graphics programmer who wants to implement ray tracing with GPUs. Since rasterization is faster in means of rendering, I thought it'd be better to render g-buffer first and compute ray-traced illumination from it, using compute shader.
However, I'm not sure how to approach ray tracing in shader; traversing BVH for ray collision check is essential for ray tracing, although sending all the object data in the scene to the VRAM doesn't seem very viable(such as, what if there are millions of triangles in the scene?). Is there a known implementation of such case? If not, how should I tackle this problem?