OpenGL RT without RT card

Hello,
I’m making 3D engine in opengl and now I’m working on lighting. Since I want to make modern engine capable of using latest technologies I want to create ray traced lighting. But I don’t have rtx card (I have r9 380) and I don’t want to upgrade to a one now since new rt capable gpus are on the way from both amd and nvidia. So my question is it is possible to use rt on card wo rt cores ?

Currently openGL dont support rayTracing and in general the news hardware features.

I know. That’s why I want to write my own path tracer in GLSL. I just want to know if RT cards are better and more efficient at doing RayTracing but you can do it with non RT cards, or they’re necessary to run any ray tracing shaders.

You can´t write a path tracer in GLSL because GLSL is just a shader languaje, so, if your card don´t support new RT cores by e.g you still need use no-pararell compute for that.

You don’t need a RTX card, but without one the performance may not be adequate. The main problem that needs to be solved is devising a spatial index which is GPU-friendly.

Also: if you do want to take advantage of RTX, you’re probably going to need to use Vulkan (see the VK_NV_ray_tracing extension). I don’t see any hints that it will be added to OpenGL in the foreseeable future.

This isn’t true.

So, you can write in GLSL a path tracer without RT cores? how? (I dind´t know)

Start with how you’d do it on a CPU, then identify any aspects which may not be GPU-friendly (e.g. branching, certain uses of mutable state). Anything you can render with a GPU can be rendered without one; it’s just going to be much slower. And any algorithm which can be implemented on a CPU can also be implemented on a GPU, although getting parallelism may take some work. E.g. for a ray-tracer, a CPU-oriented caching system (where the calculations for one pixel use the results from adjacent pixels as a heuristic) probably isn’t going to be much use.

Okay, thanks. I will probably just do it trought basic way and implement ray tracing when rtx 3000 series come out. Also I want to ask. When vulkan support RT and OpenGL doesn’t, is it possible to write function which handles ray tracing in Vulkan and everything else in OpenGL(like window handling, event handling, etc.) ?

There are a plethora of OpenGL/Vulkan interop options available to you.

However, OpenGL itself doesn’t do “window handling, event handling” or anything of the kind. Maybe you’re talking about FreeGLUT or GLFW? The former doesn’t know anything about Vulkan, while the latter is no longer OpenGL exclusive. GLFW has APIs for allowing you to create Vulkan-capable windows.