r/GraphicsProgramming
•
u/Roenbaeck
•
Oct 25 '26
•
1
Spectral Surface-Field Renderer on the iPhone
I’ve been experimenting with what I’m calling a “spectral surface-field renderer.”
The idea is to solve most of the lighting on the surfaces themselves. I split the scene into small patches and store how much light leaves each patch in different directions and at different wavelengths. Then I repeatedly pass light between the patches to build up the bounced lighting.
When rendering a view, I reuse that field with extra sampling and ray tracing for local detail, reflections and glass. Compared with a basic path tracer, which samples light paths for each pixel, this lets different pixels (and different camera views) share a lot of the lighting work.
The downside is that the field becomes an approximation. It can lose detail or introduce faceting, and changing the scene’s geometry or lighting means updating it. There’s still sampling noise too. But the upside is that it's quite performant.
This little tech demo uses a Cornell box with three balls reacting to phone tilt through Core Motion.
14
u/moschles Oct 26 '26
see left side of page 17 ,
https://www.eecs.umich.edu/courses/eecs487/W04/Lectures/radiosity.pdf
10
u/msqrt Oct 25 '26
So, essentially radiosity with final gathering? Looks quite nice!
3
u/getscrnsvrs Oct 26 '26
Storing outgoing light per patch by direction and wavelength is a neat way to get glossy and glass bounces into the same solve. The Cornell box reacting to phone tilt looks really smooth. How many wavelength samples do you keep per patch, and how do you convert the spectrum back to RGB at the end? I'm also curious how much of the budget goes to the final gather step versus updating the field on the phone.
2
u/Roenbaeck 29d ago
Well, with a moving emitter, and generally darker environment (Cornell ceiling light dimmed) I had to settle for 30FPS and noise becomes more visible. If I use temporal accumulation on the patches I can reduce the noise level, but then I get residual light that briefly remains visible on the walls. I also raised the rendering scale to 75% since that fit within the new 30FPS budget, making noise pixel-wise smaller. With 100% I get around 15FPS and overheat the phone.
Not sure where to go from here. I'll look for more optimizations in the current code, but it won't remove the noise regardless.
Happy for any denoising tricks you can suggest that works with quickly moving objects.
2
u/T-CROC Oct 26 '26
This is incredibly impressive! 2 questions
1 will you be open sourcing this? Not pressuring you to. I just want to subscribe somewhere to be notified if / when you do :)
2 can you post a video of a camera moving through a more complex scene with dynamically moving objects?