Announcing Raycore.jl: High-Performance Ray Tracing for CPU and GPUI'm excited to announce Raycore.jl, a high-performance ray-triangle intersection engine with Bounding Volume Hierarchy (BVH) acceleration, designed for both CPU and GPU execution in Julia. Raycore will power a new raytracing backend for Makie, bringing photorealistic rendering to the Makie ecosystem with the familiar Makie API. We factored out the ray intersection engine, since it can be used in many other fields like simulating light transport, heat transfer, or acoustig propagation and many other.Why Write a New Ray Intersection Engine?You might wonder: why build yet another ray tracer? The answer lies in Julia's unique strengths, the opportunities they create, and the flexibility we gain from having complete control over the rendering implementation.Advantages of JuliaHigh-level language with performance close to C/C++ - Write readable code that runs fastGreat GPU support - Single codebase runs on CUDA, AMD, Metal, oneAPI, and OpenCL via KernelAbstractions.jlMultiple dispatch for different geometries, algorithms, and materials - Extend the system cleanly without modifying core codePluggable architecture for new features - Add custom materials, sampling strategies, or acceleration structuresOne of the best languages to write out math - The code looks like the equations you'd write on paperHonest Assessment: The TradeoffsJulia isn't perfect, and there are certainly challenges:Long compile times for first use - The first run of a function triggers JIT compilationGPU code still has some rough edges - Complex kernels require careful attention to avoid allocations and GPU-unfriendly constructsNot all backends work yet - I've only tested AMDGPU and OpenCL.jl. Metal.jl and OpenCL on macOS don't work yet, though I think it's just a matter of time to support all backends.In practice, compile times aren't as bad as they might sound. You keep a Julia session running and only pay the compilation cost once. The...
First seen: 2025-11-15 01:53
Last seen: 2025-11-15 04:53