[ANN] Raycore.jl: High-Performance Ray Tracing for CPU and GPU

I’m excited to announce Raycore.jl, a high-performance ray-triangle intersection engine with BVH acceleration for both CPU and GPU execution in Julia.

Raycore will power a new raytracing backend for Makie, bringing photorealistic rendering to the ecosystem.
We factored out the ray intersection engine since it can be used in many different areas, so we’re very curious to see what the community will create with it and how far we can push the performance over the years.
The package includes interactive tutorials covering everything from basics to advanced GPU optimization.

Key features:

  • Fast BVH construction and traversal
  • CPU and GPU support via KernelAbstractions.jl
  • Analysis tools for radiosity and thermal applications
  • Written in simple and pure Julia - contributions should be much easier than for most other ray intersection libraries

Read the full announcement: https://makie.org/website/blogposts/raycore/
GitHub: GitHub - JuliaGeometry/Raycore.jl: Performant ray tracing on CPU and GPU
Docs: Home · Raycore


50 Likes

Can Raycore use RTX-cores and similar (e.g. via Vulkan.jl)?

I guess it’s possible, but the question is how we’d integrate it.
As long as we dont have proper Julia → SPIR-V compilation, we wouldn’t be able to hand it Julia callbacks for the shading… Although once we have that, and I heard we could have it, it would certainly be a killer feature.
Meanwhile, we could create an API compatible pure Vulkan + GLSL backend, which then has to implement shading in another language, but should be super fast.

I’m asking because I recently came in contact with some people who use Vulkan (in C++ with a Python frontend) for vendor independent (but RTX-capable) optics simulations for physics. I think the Vulkan.jl wrapper exposes the relevant API-calls for BVH and batched ray-triangle intersection (I’m really not an expert though), but I don’t know what the cost/latency of copying data back and forth between the backends (with shading and so on done via KernelAbstractions) would be. If we had a direct SPIR-V KA-backend on top of Vulkan.jl …

I definitely think we could have something like that in the future, completely in Julia :slight_smile:
Not sure when we’ll manage to get proper SPIRV support running, but the puzzle pieces seem to be all there.

1 Like

We do have this for OpenCL-flavored SPIR-V already, but unfortunately that is very different to GLSL-flavored SPIR-V. There is GitHub - serenity4/SPIRV.jl: Read, process and generate SPIR-V code from Julia however, @serenity4 might be able to comment on how feasible it is to use that for implementing a ray tracer.

This looks cool. Does it support 64 bit floats, which is necessary for wave optics simulations?

My understanding is that 64 bit float performance for lower cost GPU’s (< $2000) is much lower than 32bit performance.

Does Raycore.jl using 64bit GPU code run faster than 64bit CPU code?

I’ doing wave optics all the time with 32bits (32bits real part + 32bits complex part). I’m curious why we would need 64bits?

Wow! This is so cool!
Thanks a lot for sharing :heart_eyes::sparkles:

1 Like