Explore Advanced RIVE Scripting with Real-Time Ray TracingExplore Advanced RIVE Scripting with Real-Time Ray Tracing
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
This project explores how far RIVE can be pushed using scripting alone.
The project combines rasterization, real-time stylized ray tracing, ray marching, implicit surfaces, volumetric effects, and more, with consistent visibility and occlusion across techniques.
The main idea is simple: the world is rasterized by default, but if you shine the flashlight on an object, you can see what's hidden inside (ray traced).
I also added a small Easter egg to the background planet: when you look away, the red spot changes position; when you look back, it stays still. But if you stare for long enough, it eventually gives up pretending to be static and starts moving again.
Ilya's avatar
this is amazing! I would love to understand the scripting structure of how it works, are you by chance planning to share the project file?
Shaojie's avatar
Thank you!
Yes, I do plan to open-source it once I get a bit more time. At the moment, the codebase is still in a transitional state and could use some cleanup and documentation before I feel comfortable releasing it.
As you might notice, there are occasional flickers—these happen...
Ilya's avatar
awesome! I really look forward to this! are you using the Rive agent or an external agent (codex, claude code, gemini cli etc..)?
Ilya's avatar
and I do not mean to assume you are using an agent at all - you could be writing all of this yourself...
Shaojie's avatar
Here's my post on X.com. For now, the content is the same, but I might include more videos later.
Shaojie's avatar
Although the challenge is already over, I figured it’s still worth sharing a few follow-ups.
Someone asked whether the ray tracer supports multiple bounces — yes, it does, and I included some extra footage to show that.
Supporting reflections and refraction made the ray tracing...
Shaojie's avatar
Instead of aesthetics, the stylization was originally motivated by performance. Certain styles were significantly faster — for example, drawing long colored curves was much cheaper than rendering each pixel as a quad. Gradient-aware pixel orientation also improved visuals at no...
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started