#ray-tracing #opencl


Fast, modular and extendable ray tracer powered by OpenCL

3 unstable releases

0.1.2 Sep 24, 2019
0.1.1 Sep 15, 2019
0.0.1 Jul 5, 2019

#87 in Rendering




Crates.io Docs.rs Travis CI License

Flexible ray tracing engine written in Rust and OpenCL.


Clay ray tracing engine is:

  • Fast - because of the OpenCL, Clay is able to run its kernel code in massively parallel computing systems (e.g. GPUs), that makes it much faster than CPU-only analogs, and allows it to render images of sufficient quality even in real-time.

  • Modular - Clay is based on strict but flexible Rust trait system and type parametrization, that means you can assemble desired ray tracing pipeline from primitive building blocks.

  • Extendable - if desired functionality doesn't exist in Clay yet, you always can write it by yourself by implementing corresponding traits. Moreover, you can even write your own modules of OpenCL code to run on a GPU. (And make a pull request after that, if you want to.)

This project is primarily aimed to be a convenient framework for experimenting with ray tracing, testing new techniques, making proof of concepts and other research activity in this field.

The key principles of the project is modularity and extendability. The performance is also one of the primary goals, as long as it doesn't significantly reduce flexibility.

You can find more information at the Clay project website.


Licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.


  • OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.


~216K SLoC