A simple ray tracer, written to function as an OpenCL snippet within the COPS context of SideFX Houdini.
Created from the concepts described in the indispensable Ray Tracing in One Weekend book:
https://raytracing.github.io/books/RayTracingInOneWeekend.html
- Drop down an OpenCl node within a Cops context
- Paste cops_ray_tracer.c into the kernel code text box
- Set signature>outputs1 to Cdout and type to RGB
- Click icon above kernel code to add parameters to interface
There is also an example hip file in this repository.
https://www.youtube.com/watch?v=JjPsg5_ESIU