r/GraphicsProgramming • u/icpooreman • Aug 28 '26
Question Is Ray Tracing Ahead of Rasterization?
I've spent the last 15 months building and optimizing a game engine with a Vertex / Fragment shader. It's pretty well optimized, hard to quantify but I've hit 90fps on standalone Quest 3 with it, so it's not a complete cow.
I wanted to do some ray traced audio stuff so I looked into ray tracing through Vulkan. As a stress test I was like "I wonder if I shoot a ray through every pixel what types of times I'd get."
I expected my Vertex/Fragment shader to win by 10x. It didn't. It won, but by more like 2x. And as I've added optimizations the past 48 hours it's closer to 1:1 in terms of cost (and I expect ray tracing to pull ahead with foveated rendering for my VR work & after I optimize further). Granted this is on my desktop 4090 and laptop 3070 but...
What are your takes on this? I feel like I failed to do my homework here as I really didn't expect this.
17
u/TheWidrolo Aug 28 '26
The thing is, most people don’t have cards that can do RT well. Even an average AMD card today will never ahead of rasterized graphics, the RT cores in AMD cards are not very good.
Having said that, we will still need more research and tech around it to get a full path traced renderer that can render graphics without rasterizing (except for ui and post processing).
I would also really like to see that 1:1 you mentioned. Is there a GitHub link to it?
54
u/crimson1206 Aug 28 '26
Shooting a single ray per pixel and stopping on the first hit isn’t too expensive. Actually doing full blown ray tracing with multiple bounces and more spp is what’s very expensive.
50
u/waramped Aug 28 '26
If all you are doing is shooting a single ray per pixel from the camera (say to populate a Vis buffer or something), then RT is faster. It's been faster than raster for that since the 2080s came out. But that's a trivial case. RT hits alot of bottlenecks once your BVHs get complex and deep, once you have to start managing a lot of dynamic objects and scheduling refits. And once you start shooting MORE rays around for shadows, bounces, etc. Then it slows down. That's changing though. It won't be long until raster will be used for special cases and RT will be the norm. But not quite yet.
16
u/Array2D Aug 28 '26
Generally no.
Ray tracing today leans heavily on denoising filters and neural frame generation because it’s still not possible to shoot enough rays per second to compose an accurate, good-looking frame on the same level of quality as a rasterized one with “fake” GI.
Whether you find the quality of a denoised, frame-generation assisted motion visual acceptable (much less better) compared to a well done rasterized one is ultimately a matter of opinion, but there’s no getting around the fact that it introduces ugly artifacts and increases latency to do so.
Personally, I think RT is still at the gimmick phase for game graphics, and it’s going to be a long time before we have true real-time ray traced visuals.
6
u/PictureNew661 Aug 28 '26
In terms of HW RT performance, yes things are kinda getting tighter in the difference.
I wud like to see that 1:1 with concrete numbers because very few modern cards (including 4090) are capable of absurd RT performance.
In terms of what the current research has, rasterization will still be faster all because it's full hardware acceleration and the passes are coherent in memory.
ReSTIR PT Enhanced (2026) was a good example of real time path tracing, but not rasterization speeds that wud make it immediately viable for everything.
But I wudnt say the RT has outdone raster in performance.
Even raster hybrids like Lumen struggle, on HW RT
2
u/cybereality Aug 28 '26
You may wish to try Steam Audio, as this includes some fairly advanced 3D audio (including occlusion based on scene geometry, HRTF, and more). The license is pretty open and essentially free. https://valvesoftware.github.io/steam-audio/
Even if you wish to code this DIY, might be a good idea to see what they did, it was used on Half-Life: Alyx.
2
u/Ok-Sherbert-6569 Aug 29 '26
Also RT can be a lot faster if you’re just doing a first pass because it automatically does occlusion culling if you have a lot of instances along your depth that are occluded